| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| part of $LIBRARYNAME; |
| |
| @DocsEditable() |
| $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { |
| $!MEMBERS |
| |
| // As of Chrome 37, these all changed from long to double. This code |
| // preserves backwards compatability for the time being. |
| $if DART2JS |
| int get __clientX => JS('num', '#.clientX', this).round(); |
| int get __clientY => JS('num', '#.clientY', this).round(); |
| int get __screenX => JS('num', '#.screenX', this).round(); |
| int get __screenY => JS('num', '#.screenY', this).round(); |
| int get __pageX => JS('num', '#.pageX', this).round(); |
| int get __pageY => JS('num', '#.pageY', this).round(); |
| int get __radiusX => JS('num', '#.radiusX', this).round(); |
| int get __radiusY => JS('num', '#.radiusY', this).round(); |
| $else |
| int get __clientX => _blink.BlinkTouch.instance.clientX_Getter_(this).round(); |
| int get __clientY => _blink.BlinkTouch.instance.clientY_Getter_(this).round(); |
| int get __screenX => _blink.BlinkTouch.instance.screenX_Getter_(this).round(); |
| int get __screenY => _blink.BlinkTouch.instance.screenY_Getter_(this).round(); |
| int get __pageX => _blink.BlinkTouch.instance.pageX_Getter_(this).round(); |
| int get __pageY => _blink.BlinkTouch.instance.pageY_Getter_(this).round(); |
| int get __radiusX => _blink.BlinkTouch.instance.radiusX_Getter_(this).round(); |
| int get __radiusY => _blink.BlinkTouch.instance.radiusY_Getter_(this).round(); |
| $endif |
| |
| @DomName('Touch.clientX') |
| @DomName('Touch.clientY') |
| Point get client => new Point(__clientX, __clientY); |
| |
| @DomName('Touch.pageX') |
| @DomName('Touch.pageY') |
| Point get page => new Point(__pageX, __pageY); |
| |
| @DomName('Touch.screenX') |
| @DomName('Touch.screenY') |
| Point get screen => new Point(__screenX, __screenY); |
| |
| @DomName('Touch.radiusX') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| int get radiusX => __radiusX; |
| |
| @DomName('Touch.radiusY') |
| @DocsEditable() |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @SupportedBrowser(SupportedBrowser.SAFARI) |
| @Experimental() |
| int get radiusY => __radiusY; |
| |
| } |