Zebra API Doc

zebra.ui.CursorManager Class

Cursor manager class. Allows developers to control mouse cursor type by implementing an own getCursorType method or by specifying a cursor by cursorType field. Imagine an UI component needs to change cursor type. It can be done by one of the following way:

  • Implement getCursorType method by the component itself if the cursor type depends on cursor location

    var p = new zebra.ui.Panel([
         // implement getCursorType method to set required
         // mouse cursor type
         function getCursorType(target, x, y) {
             return zebra.ui.Cursor.WAIT;
         }
    ]);
  • Define "cursorType" property in component if the cursor type doesn't depend on cursor location

    var myPanel = new zebra.ui.Panel();
    ...
    myPanel.cursorType = zebra.ui.Cursor.WAIT;

Constructor

zebra.ui.CursorManager

()

Methods

mouseDragged

(
  • e
)

Define mouse dragged events handler.

Parameters:

mouseEntered

(
  • e
)

Define mouse entered events handler.

Parameters:

mouseExited

(
  • e
)

Define mouse exited events handler.

Parameters:

mouseMoved

(
  • e
)

Define mouse moved events handler.

Parameters:

Attributes

cursorType

String readonly

Current cursor type

Default: "default"