You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.
If you position a hidden circle over a visible circle the event on the visible circle will not get triggered.
var radius = 20;
var display = doodle.createDisplay('#display', {width:600, height:600});
var layer0 = display.createLayer();
// target circle
var sprite = doodle.createSprite();
sprite.graphics.lineStyle(0, 0x000000, 0);
sprite.graphics.beginFill(0x22ff55);
sprite.graphics.circle(0, 0, radius);
sprite.graphics.endFill();
sprite.x = 200;
sprite.y = 200;
layer0.addChild(sprite);
// flash circle
var circleFlash = doodle.createSprite();
circleFlash.graphics.lineStyle(0, 0x000000, 0);
circleFlash.graphics.beginFill(0xffffff);
circleFlash.graphics.circle(0, 0, radius * 2);
circleFlash.graphics.endFill();
circleFlash.x = sprite.x;
circleFlash.y = sprite.y;
circleFlash.visible = false;
layer0.addChild(circleFlash);
// sprite click event
sprite.on(doodle.events.MouseEvent.CLICK, function (event) {
console.info( 'click'); // will not execute if flash circle is hidden over top of the sprite circle
});
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you position a hidden circle over a visible circle the event on the visible circle will not get triggered.
The text was updated successfully, but these errors were encountered: