diff options
Diffstat (limited to 'src/modules/optional/sugar.js')
-rw-r--r-- | src/modules/optional/sugar.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/optional/sugar.js b/src/modules/optional/sugar.js index 9cdc662..69f723e 100644 --- a/src/modules/optional/sugar.js +++ b/src/modules/optional/sugar.js @@ -159,6 +159,18 @@ registerMethods(['Element', 'Runner'], { } }) +registerMethods('Text', { + ax (x) { + return this.attr('x', x) + }, + ay (y) { + return this.attr('y', y) + }, + amove (x, y) { + return this.ax(x).ay(y) + } +}) + // Add events to elements const methods = [ 'click', 'dblclick', |