Added the maps-module to the iwmlib.
Migrated a ot of the content from the tuesch to the iwmlib. This is before the decoupeling of the layers.
This commit is contained in:
Vendored
+30
-1
@@ -184,7 +184,7 @@
|
||||
let pre = document.createElement('pre');
|
||||
// See http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work
|
||||
// let re = /Doctest\.expect\(([\s\S]*)[\,\s\S]*([\s\S]*)\)/g
|
||||
let lines = text.value.split('\n');
|
||||
let lines = text.value ? text.value.split('\n') : text.split('\n');
|
||||
let better = [];
|
||||
for (let line of lines) {
|
||||
if (replaceExpect && line.trim().startsWith('Doctest.expect(')) {
|
||||
@@ -508,6 +508,19 @@
|
||||
|
||||
static toLine(event) {
|
||||
return `${event.type} #${event.target.id} ${event.clientX} ${event.clientY}`
|
||||
let result = event.type;
|
||||
let selector = this.selector(event.target);
|
||||
result += ' selector: ' + selector;
|
||||
if (event.target != document.querySelector(selector)) console.log('Cannot resolve', selector);
|
||||
let keys = ['layerX', 'layerY', 'pageX', 'pageY', 'clientX', 'clientY'];
|
||||
for (let key of keys) {
|
||||
try {
|
||||
result += ' ' + key + ':' + event[key];
|
||||
} catch (e) {
|
||||
console.log('Invalid key: ' + key);
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
static compareExtractedWithSimulated() {
|
||||
@@ -2651,6 +2664,7 @@
|
||||
if (found != null) {
|
||||
this.interaction.addTarget(key, found);
|
||||
}
|
||||
console.log(this.target);
|
||||
}
|
||||
let size = this.interaction.current.size;
|
||||
let limit = this.logInteractionsAbove;
|
||||
@@ -10980,6 +10994,21 @@
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
Vendored
+5263
-3
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user