~yrke/tapaal/remove-staticIgnoreSelect

« back to all changes in this revision

Viewing changes to src/pipe/gui/graphicElements/tapn/TimedInputArcComponent.java

merged in brnch  lp:~tapaal-contributor/tapaal/interval-lables-on-arcs-1242848
allowing to move labels of arcs around in the net

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import pipe.dataLayer.NetType;
10
10
import pipe.gui.CreateGui;
11
11
import pipe.gui.DrawingSurfaceImpl;
 
12
import pipe.gui.Grid;
12
13
import pipe.gui.Pipe;
 
14
import pipe.gui.Zoomer;
13
15
import pipe.gui.graphicElements.PlaceTransitionObject;
14
16
import pipe.gui.handler.TimedArcHandler;
15
17
import pipe.gui.undo.ArcTimeIntervalEdit;
160
162
 
161
163
        @Override
162
164
        public void setLabelPosition() {
163
 
                label.setPosition((int) (myPath.midPoint.x)
164
 
                                + label.getWidth() / 2 - 4, (int) (myPath.midPoint.y)
165
 
                                - ((zoom / 55) * (zoom / 55)));
 
165
                /*label.setPosition((int) (myPath.midPoint.x + nameOffsetX)
 
166
                                + label.getWidth() / 2 - 4, (int) (myPath.midPoint.y + nameOffsetY)
 
167
                                - ((zoom / 55) * (zoom / 55)));*/
 
168
                label.setPosition(Grid.getModifiedX((double) (myPath.midPoint.x + Zoomer.getZoomedValue(nameOffsetX, zoom))), 
 
169
                                                  Grid.getModifiedY((double) (myPath.midPoint.y + Zoomer.getZoomedValue(nameOffsetY, zoom))));
166
170
        }
167
171
 
168
172
        public dk.aau.cs.model.tapn.TimedInputArc underlyingTimedInputArc() {