Changeset 153:d79a71382836 in glemon-0.x
- Timestamp:
- 09/25/06 14:08:35 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@2957
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
graph_displayer_canvas-event.cc
r151 r153 170 170 for(OutEdgeIt ei((mytab.mapstorage).graph,active_node);ei!=INVALID;++ei) 171 171 { 172 XY arrow_pos; 173 174 if (mytab.mapstorage.graph.source(ei) == mytab.mapstorage.graph.target(ei)) 175 { 176 arrow_pos = mytab.mapstorage.arrow_pos[ei] + XY(dx, dy); 177 } 178 else 179 { 172 180 XY moved_node_1(coord_x - dx, coord_y - dy); 173 181 XY moved_node_2(coord_x, coord_y); 174 182 Node target = mytab.mapstorage.graph.target(ei); 175 183 XY fix_node(mytab.mapstorage.coords[target].x, 176 184 mytab.mapstorage.coords[target].y); 177 185 XY old_arrow_pos(mytab.mapstorage.arrow_pos[ei]); 178 186 179 XY arrow_pos;180 arrow_pos = calcArrowPos(moved_node_1, moved_node_2, fix_node, old_arrow_pos, isbutton); 181 182 183 184 185 186 187 188 189 187 arrow_pos = calcArrowPos(moved_node_1, moved_node_2, fix_node, old_arrow_pos, isbutton); 188 } 189 190 mytab.mapstorage.arrow_pos.set(ei, arrow_pos); 191 edgesmap[ei]->draw(); 192 193 //reposition of edgetext 194 XY text_pos=mytab.mapstorage.arrow_pos[ei]; 195 text_pos+=(XY(10,10)); 196 edgetextmap[ei]->property_x().set_value(text_pos.x); 197 edgetextmap[ei]->property_y().set_value(text_pos.y); 190 198 } 191 199 192 200 for(InEdgeIt ei((mytab.mapstorage).graph,active_node);ei!=INVALID;++ei) 193 201 { 202 if (mytab.mapstorage.graph.source(ei) != mytab.mapstorage.graph.target(ei)) 203 { 194 204 XY moved_node_1(coord_x - dx, coord_y - dy); 195 205 XY moved_node_2(coord_x, coord_y); 196 206 Node source = mytab.mapstorage.graph.source(ei); 197 207 XY fix_node(mytab.mapstorage.coords[source].x, 198 208 mytab.mapstorage.coords[source].y); 199 209 XY old_arrow_pos(mytab.mapstorage.arrow_pos[ei]); 200 210 201 211 XY arrow_pos; 202 212 arrow_pos = calcArrowPos(moved_node_1, moved_node_2, fix_node, old_arrow_pos, isbutton); 203 213 204 214 mytab.mapstorage.arrow_pos.set(ei, arrow_pos); 205 215 edgesmap[ei]->draw(); 206 216 207 //reposition of edgetext 208 XY text_pos=mytab.mapstorage.arrow_pos[ei]; 209 text_pos+=(XY(10,10)); 210 edgetextmap[ei]->property_x().set_value(text_pos.x); 211 edgetextmap[ei]->property_y().set_value(text_pos.y); 217 //reposition of edgetext 218 XY text_pos=mytab.mapstorage.arrow_pos[ei]; 219 text_pos+=(XY(10,10)); 220 edgetextmap[ei]->property_x().set_value(text_pos.x); 221 edgetextmap[ei]->property_y().set_value(text_pos.y); 222 } 212 223 } 213 224 } … … 527 538 for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) 528 539 { 529 if(edgesmap[i] ==active_item)540 if(edgesmap[i]->getLine()==active_item) 530 541 { 531 542 active_edge=i;
Note: See TracChangeset
for help on using the changeset viewer.