mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 22:20:44 +00:00
GameObjects.DOMElement.pointerEvents
is a new property that allows you to set the pointerEvents
attribute on the DOM Element CSS. This is auto
by default and should not be changed unless you know what you're doing.
This commit is contained in:
parent
bcd48a25f5
commit
b280f3f400
2 changed files with 14 additions and 0 deletions
|
@ -207,6 +207,19 @@ var DOMElement = new Class({
|
|||
*/
|
||||
this.rotate3dAngle = 'deg';
|
||||
|
||||
/**
|
||||
* Sets the CSS `pointerEvents` attribute on the DOM Element during rendering.
|
||||
*
|
||||
* This is 'auto' by default. Changing it may have unintended side-effects with
|
||||
* internal Phaser input handling, such as dragging, so only change this if you
|
||||
* understand the implications.
|
||||
*
|
||||
* @name Phaser.GameObjects.DOMElement#pointerEvents
|
||||
* @type {string}
|
||||
* @since 3.55.0
|
||||
*/
|
||||
this.pointerEvents = 'auto';
|
||||
|
||||
/**
|
||||
* The native (un-scaled) width of this Game Object.
|
||||
*
|
||||
|
|
|
@ -104,6 +104,7 @@ var DOMElementCSSRenderer = function (renderer, src, camera, parentMatrix)
|
|||
style.display = 'block';
|
||||
style.opacity = alpha;
|
||||
style.zIndex = src._depth;
|
||||
style.pointerEvents = src.pointerEvents;
|
||||
style.mixBlendMode = CSSBlendModes[src._blendMode];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue