Namespace: options

Creap. options

Source:

Members


isAccurateTarget :bool

Whether set accurate target when fires mouse/touch event.

When code like the following...

exportRoot.addEventListener("mousedown", function(e) {
    console.log(e.currentTarget);
    console.log(e.target);
})

  • isAccurateTarget = true;
  • console.log(e.currentTarget); // exportRoot
    console.log(e.target); // Bitmap

    This specification is the same as createjs, but performance tends to decline instead.
    It is especially noticeable when many mousemove event fires on the browser for PC.

  • isAccurateTarget = false;
  • console.log(e.currentTarget); // exportRoot
    console.log(e.target); // exportRoot

    If you don't need an accurate target, please use this setting.

    In createjs, the conditions under which pressmove, pressup events can fire.

  • "e.currentTarget" that when the mousedown event fires. ( = instance with the event listener)
  • "e.target" that when the mousedown event fires.
  • Instance containing "e.target" when the mousedown event fires.

  • Therefore, if isAccurateTarget is false, please be aware that pressmove and pressup may not behave as expected.

    Type:
    • bool
    Default Value:
    • true
    Source: