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

Images without fill option can't be hovered #68

Closed
GMartigny opened this issue Nov 10, 2019 · 0 comments
Closed

Images without fill option can't be hovered #68

GMartigny opened this issue Nov 10, 2019 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@GMartigny
Copy link
Member

Information

  • Your current navigator: Chrome v78
  • The package and version you used: @pencil.js/component@1.12.0 pencil.js/image@1.12.0

Description

The Component's isHover function returns true only if the Component is either filled or stroked. Image can be drawn without neither of these and are not detected as hovered.

As with malePath, maybe Image need its own duplication of isHover to account for this.

May be fixed by a refacto when doing #67.

Reproduce by

const img = new P.Image(scene.center, "url.png", {
    fill: "white", // <- The image can't be hovered without this
});
img.on("ready", () => scene.add(img).render())
    .on("hover", console.log("Hover"));
@GMartigny GMartigny added the 🐛 bug Something isn't working label Nov 10, 2019
@GMartigny GMartigny changed the title Images without fill can't be hovered Images without fill option can't be hovered Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant