Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container Interaction #11

Closed
tjbell opened this issue Feb 10, 2011 · 2 comments
Closed

Container Interaction #11

tjbell opened this issue Feb 10, 2011 · 2 comments

Comments

@tjbell
Copy link

tjbell commented Feb 10, 2011

From the documentation: "If an onClick handler is set on a container, it will receive the event if any of its children are clicked." However I tried this:
var startButton = new Container();
buttonBg = new Shape();
buttonBg.graphics.f("#A6A6A6").ss(1).s("#0F0").rr(55,55,55,25,5);
var label = new Text("Start", "16px Arial", "#000");
label.textAlign = "center";
label.x = 82;
label.y = 73;
label.maxWidth = 25;
label.alpha = 0.7;
startButton.addChild(buttonBg,label);
stage.addChild(startButton);
startButton.onClick = function(evt) { console.log("Start Pressed"); }

Nothing happened. But this worked:
buttonBg.onClick = function(evt) { console.log("Start Pressed"); }

@gskinner
Copy link
Member

This issue should be fixed in the latest source version, committed this morning. Please let me know if you continue to experience this bug with the new source.

@gskinner
Copy link
Member

Tested in v0.3.1. Fixed.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants