Images without fill option can't be hovered
GMartigny opened this issue · 0 comments
GMartigny commented
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"));