Breaking Change: dart:html Point & Rect

61 views
Skip to first unread message

Pete Blois

unread,
Mar 8, 2013, 1:16:09 PM3/8/13
to mi...@dartlang.org
FYI-
We're introducing Point and Rect types to dart:html and changing some APIs to use them.

Input events are having their position properties change from clientX & clientY to a single Point field. 
The old syntax is currently deprecated.
Old:
var x = mouseEvent.offsetX;
New:
var x = mouseEvent.offset.x;

Element.client* and Element.offset* properties have now become rects as well.
The old syntax is currently deprecated.
Old:
var top = Element.clientTop;
New:
var top = Element.client.top;

In addition, Element.getBoundingClientRect() now returns a Rect rather than a ClientRect. The ClientRect type has been hidden.
Reply all
Reply to author
Forward
0 new messages