Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #185 from iamdustan/bubble-drag

Change drag/multi:drag ui events to bubblable
  • Loading branch information...
commit 1d8a054c1c8b4b8c18334d941da8473d1e1bc14a 2 parents a7ce924 + 97cdb90
@davidaurelio davidaurelio authored
Showing with 5 additions and 1 deletion.
  1. +3 −1 example/library/movies/event-drag.js
  2. +2 −0  src/runner/ui_event.js
View
4 example/library/movies/event-drag.js
@@ -11,11 +11,12 @@ for (var a = 0; a < 3; ++a) {
var x, y,
fill = color('red').darker(.1).randomize('hue');
- new Rect(
+ var r = new Rect(
a * 150 + 50, b * 150 + 50, 100, 100
).attr({
fillColor: fill
})
+ var g = new Group()
.on('mouseover', function() {
this.attr('fillColor', fill.lighter(.2));
})
@@ -35,6 +36,7 @@ for (var a = 0; a < 3; ++a) {
})
.emit('multi:pointerdown')
.addTo(stage);
+ r.addTo(g);
}());
}
View
2  src/runner/ui_event.js
@@ -10,6 +10,8 @@ define(function() {
pointermove: true,
click: true,
doubleclick: true,
+ drag: true,
+ 'multi:drag': true,
'multi:pointerdown': true,
'multi:pointermove': true,
'multi:pointerup': true
Please sign in to comment.
Something went wrong with that request. Please try again.