Tile editor

i want make a tile data editor with ZIM,but ZIM tile can't make the mouseOver event effect like the link example.

ZIM demo

Not quite sure what you mean about the mouseover event effect.

I would use hitTestGrid() for this - it has better performance than mouseover.

The events we have for mouse are:

S.on("stagemousemove", function) - for capturing mouse always even if nothing under the mouse.
object.on("mouseover", function)
object.on("mouseout", function)

So you can set the stagemousemove when you mouseover and remove it when you mouseout.

There is also

object.on("mousedown", function)
object.on("pressdown", function) // same as above
object.on("pressmove", function)
object.on("pressup", function)

But... for a grid, use hitTestGrid() - it is faster.

thanks,use hitTestGrid() is good idea.

1 Like