hide()
Hide the mouse cursor.
Description
Hide the mouse cursor. Sets the CSS cursor property to "none".
Return Value
Mouse. Returns the mouse module itself.
Examples
Example 1
We create a core instance and a rectangle and add it to the canvas. Then we bind handlers to both the mouseenter event and the mouseleave event. In the handlers we hide the cursor when hovering the rectangle, and show it again when the pointer leaves the rectangle.
View Example
Code
var canvas = oCanvas.create({
canvas: "#canvas",
background: "#ccc"
});
var rectangle = canvas.display.rectangle({
x: 77,
y: 74,
width: 200,
height: 100,
fill: "#000"
});
canvas.addChild(rectangle);
rectangle.bind("mouseenter", function () {
canvas.mouse.hide();
}).bind("mouseleave", function () {
canvas.mouse.show();
});
Output