SmartClient Version: v10.0p_2015-10-13/PowerEdition Deployment (built 2015-10-13)
Tested with IE11 and Chrome Version 46.0.2490.80 m (64-bit)
Rotated rectangles have wrong top and left coordinates when they are moved.
Please see the testcase.
Click on the rectangle when initially drawn. Left/top should be 100/100.
Then move the rectangle to the right. The top value is negative now.
Doing the same test without drawRect.rotateTo(45.00) gives a correct result.
Tested with IE11 and Chrome Version 46.0.2490.80 m (64-bit)
Code:
package at.qwf.test1.client; import at.qwf.test1.client.exception.ClientExceptionHandler; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.smartgwt.client.types.KnobType; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.drawing.DrawPane; import com.smartgwt.client.widgets.drawing.DrawRect; import com.smartgwt.client.widgets.drawing.events.ClickEvent; import com.smartgwt.client.widgets.drawing.events.ClickHandler; public class Test1 implements EntryPoint { @Override public void onModuleLoad() { GWT.setUncaughtExceptionHandler(new ClientExceptionHandler()); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { DrawPane drawPane = new DrawPane(); drawPane.setWidth(800); drawPane.setHeight(800); DrawRect drawRect = new DrawRect(); drawRect.setKnobs(KnobType.RESIZE, KnobType.MOVE); drawRect.setDrawPane(drawPane); drawRect.setRect(100, 100, 200, 100); drawRect.rotateTo(45.00); drawRect.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { DrawRect rect = (DrawRect) event.getSource(); SC.say(("Left/Top is " + rect.getLeft() + "/" + rect.getTop())); } }); drawPane.draw(); } }); } }
Please see the testcase.
Click on the rectangle when initially drawn. Left/top should be 100/100.
Then move the rectangle to the right. The top value is negative now.
Doing the same test without drawRect.rotateTo(45.00) gives a correct result.
Comment