Fixed button bug with area interaction.
This commit is contained in:
parent
42afa3e7ab
commit
71e5ce8b8e
20
dist/iwmlib.js
vendored
20
dist/iwmlib.js
vendored
@ -2631,6 +2631,7 @@
|
|||||||
tapDistance = 10,
|
tapDistance = 10,
|
||||||
longPressTime = 500.0,
|
longPressTime = 500.0,
|
||||||
useCapture = true,
|
useCapture = true,
|
||||||
|
capturePointerEvents = true,
|
||||||
mouseWheelElement = null,
|
mouseWheelElement = null,
|
||||||
logInteractionsAbove = 12
|
logInteractionsAbove = 12
|
||||||
} = {}
|
} = {}
|
||||||
@ -2638,6 +2639,7 @@
|
|||||||
super(element, target, {
|
super(element, target, {
|
||||||
tapDistance,
|
tapDistance,
|
||||||
useCapture,
|
useCapture,
|
||||||
|
capturePointerEvents,
|
||||||
longPressTime,
|
longPressTime,
|
||||||
mouseWheelElement
|
mouseWheelElement
|
||||||
});
|
});
|
||||||
@ -3911,7 +3913,7 @@
|
|||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
element,
|
element,
|
||||||
{ stopEvents = 'auto', claimEvents = true, useCapture = true, touchAction = 'none', debugCanvas = null } = {}
|
{ stopEvents = 'auto', claimEvents = true, useCapture = true, capturePointerEvents = true, touchAction = 'none', debugCanvas = null } = {}
|
||||||
) {
|
) {
|
||||||
this.onCapture = null;
|
this.onCapture = null;
|
||||||
this.element = element;
|
this.element = element;
|
||||||
@ -3936,6 +3938,7 @@
|
|||||||
this.scatter = new Map();
|
this.scatter = new Map();
|
||||||
this.delegate = new InteractionMapper$1(element, this, {
|
this.delegate = new InteractionMapper$1(element, this, {
|
||||||
useCapture,
|
useCapture,
|
||||||
|
capturePointerEvents,
|
||||||
mouseWheelElement: window
|
mouseWheelElement: window
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -10962,21 +10965,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
speak() {
|
speak() {
|
||||||
/**
|
|
||||||
* This is a little bit ugly, but imho the most elegant of all dirty solutions.
|
|
||||||
*
|
|
||||||
5ht * Within the plugins we have no knowledge of other cards and such. But must differentiate the
|
|
||||||
* clicks by their corresponding owner. The SpeechUtterance just takes a text and has no knowledge
|
|
||||||
* about the node that is currently read to the user.
|
|
||||||
*
|
|
||||||
* This means, that we can identify same text, but not differentiate same text on different nodes.
|
|
||||||
* To account for that, we add the node to the speechSynthesis object (#benefitsOfJavaScript) and
|
|
||||||
* have access to the node, by - let's say - expanding the functionality of the SpeechSynthesis object.
|
|
||||||
*
|
|
||||||
* SO -17.07.19
|
|
||||||
*/
|
|
||||||
|
|
||||||
let activeNode = window.speechSynthesis['speechPluginNode'];
|
|
||||||
this._updateText();
|
this._updateText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
dist/iwmlib.pixi.js
vendored
10
dist/iwmlib.pixi.js
vendored
@ -2862,10 +2862,10 @@
|
|||||||
* @return {Button} A reference to the button for chaining.
|
* @return {Button} A reference to the button for chaining.
|
||||||
*/
|
*/
|
||||||
hide() {
|
hide() {
|
||||||
this.opts.strokeAlpha = 0;
|
this.opts.strokeAlpha = 0.0;
|
||||||
this.opts.strokeActiveAlpha = 0;
|
this.opts.strokeActiveAlpha = 0.0;
|
||||||
this.opts.fillAlpha = 0;
|
this.opts.fillAlpha = 0.0000000001; // WORKAROUND: See https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide#graphics-interaction
|
||||||
this.opts.fillActiveAlpha = 0;
|
this.opts.fillActiveAlpha = 0.0000000001;
|
||||||
|
|
||||||
this.layout();
|
this.layout();
|
||||||
|
|
||||||
@ -6260,6 +6260,7 @@
|
|||||||
tapDistance = 10,
|
tapDistance = 10,
|
||||||
longPressTime = 500.0,
|
longPressTime = 500.0,
|
||||||
useCapture = true,
|
useCapture = true,
|
||||||
|
capturePointerEvents = true,
|
||||||
mouseWheelElement = null,
|
mouseWheelElement = null,
|
||||||
logInteractionsAbove = 12
|
logInteractionsAbove = 12
|
||||||
} = {}
|
} = {}
|
||||||
@ -6267,6 +6268,7 @@
|
|||||||
super(element, target, {
|
super(element, target, {
|
||||||
tapDistance,
|
tapDistance,
|
||||||
useCapture,
|
useCapture,
|
||||||
|
capturePointerEvents,
|
||||||
longPressTime,
|
longPressTime,
|
||||||
mouseWheelElement
|
mouseWheelElement
|
||||||
});
|
});
|
||||||
|
@ -632,10 +632,10 @@ export default class Button extends PIXI.Container {
|
|||||||
* @return {Button} A reference to the button for chaining.
|
* @return {Button} A reference to the button for chaining.
|
||||||
*/
|
*/
|
||||||
hide() {
|
hide() {
|
||||||
this.opts.strokeAlpha = 0
|
this.opts.strokeAlpha = 0.0
|
||||||
this.opts.strokeActiveAlpha = 0
|
this.opts.strokeActiveAlpha = 0.0
|
||||||
this.opts.fillAlpha = 0
|
this.opts.fillAlpha = 0.0000000001 // WORKAROUND: See https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide#graphics-interaction
|
||||||
this.opts.fillActiveAlpha = 0
|
this.opts.fillActiveAlpha = 0.0000000001
|
||||||
|
|
||||||
this.layout()
|
this.layout()
|
||||||
|
|
||||||
|
@ -51,7 +51,8 @@ const index = new Index(itemTemplate, [
|
|||||||
['Flip Effect', 'flipeffect.html'],
|
['Flip Effect', 'flipeffect.html'],
|
||||||
['Blur Filter', 'blurfilter.html'],
|
['Blur Filter', 'blurfilter.html'],
|
||||||
['Text', 'text.html'],
|
['Text', 'text.html'],
|
||||||
['Scrollview', 'scrollview.html']
|
['Scrollview', 'scrollview.html'],
|
||||||
|
['Stylus', 'stylus.html']
|
||||||
],
|
],
|
||||||
null)
|
null)
|
||||||
index.load()
|
index.load()
|
||||||
|
Loading…
Reference in New Issue
Block a user