MouseEvent_ stageX_ rawX_localX - bobby169/createjsDoc GitHub Wiki

MouseEvent

Passed as the parameter to all mouse/pointer/touch related events. For a listing of mouse events and their properties,

stageX

stage上标准坐标位置,取值为范围是0~stage.width

rawX

stage原始坐标。如果没有设置stage.mouseMoveOutside = true且鼠标没有滑动到stage外的话,rawX === stageX,相反会计算边界值

localX

返回鼠标在当前目标target(ie. the dispatcher)的本地坐标系中的X位置。

p._get_localX = function() {
  return this.currentTarget.globalToLocal(this.rawX, this.rawY).x;
}