From 190d28b6dffa03a2eec88b3ac21dd80df26cf442 Mon Sep 17 00:00:00 2001 From: Manfred Knobloch Date: Wed, 22 May 2019 16:03:19 +0200 Subject: [PATCH] repair doctests - not yet finished --- dist/iwmlib.3rdparty.js | 166 ++++++++++++++++----------------- lib/app.html | 87 +++++++++-------- lib/capabilities.html | 6 +- lib/coordinates.html | 4 +- lib/doctest.html | 8 +- lib/electron.html | 8 +- lib/events.html | 8 +- lib/examples/memory/index.html | 2 +- lib/examples/multitouch.html | 2 +- lib/flippable.html | 6 +- lib/frames.html | 8 +- lib/imageloader.html | 8 +- lib/index.html | 12 ++- lib/inspect.html | 6 +- lib/interaction.html | 6 +- lib/interface.html | 6 +- lib/pixi/app-resolution.html | 10 +- lib/pixi/app.html | 10 +- lib/pixi/application.html | 5 +- lib/pixi/badge.html | 6 +- lib/pixi/blurfilter.html | 10 +- lib/pixi/button.html | 6 +- lib/pixi/buttongroup.html | 6 +- lib/pixi/coordinates.html | 10 +- lib/pixi/deepzoom/image.html | 2 +- lib/pixi/deepzoom/index.html | 2 +- lib/pixi/deepzoom/test.html | 2 +- lib/pixi/flipeffect.html | 10 +- lib/pixi/flippable.html | 6 +- lib/pixi/flippable.test.html | 6 +- lib/pixi/forcelayout.html | 6 +- lib/pixi/index.html | 2 +- lib/pixi/labeledgraphics.html | 6 +- lib/pixi/message.html | 6 +- lib/pixi/modal.html | 6 +- lib/pixi/popover.html | 10 +- lib/pixi/popup.html | 6 +- lib/pixi/popupmenu.html | 8 +- lib/pixi/progress.html | 6 +- lib/pixi/scatter.html | 10 +- lib/pixi/slider.html | 6 +- lib/pixi/text.html | 6 +- lib/pixi/theme.html | 6 +- lib/pixi/tooltip.html | 6 +- lib/pixi/volatile.html | 6 +- lib/poppable.html | 8 +- lib/popup.html | 8 +- lib/popupmenu.html | 8 +- lib/scatter.html | 4 +- lib/styleguide.html | 4 +- lib/stylus/index.html | 2 +- lib/test.html | 8 +- lib/uitest.html | 2 +- lib/utils.html | 6 +- package-lock.json | 41 +++----- 55 files changed, 305 insertions(+), 316 deletions(-) diff --git a/dist/iwmlib.3rdparty.js b/dist/iwmlib.3rdparty.js index 10e249b..1a71534 100644 --- a/dist/iwmlib.3rdparty.js +++ b/dist/iwmlib.3rdparty.js @@ -85199,86 +85199,86 @@ module.exports = function (_Plugin) { },{}]},{},[13]); -/*jslint plusplus: true, vars: true, indent: 2 */ -/* convertPointFromPageToNode.js from - - - convertPointFromPageToNode(element, event.pageX, event.pageY) -> {x, y} - returns coordinate in element's local coordinate system (works properly - with css transforms without perspective projection) - convertPointFromNodeToPage(element, offsetX, offsetY) -> {x, y} - returns coordinate in window's coordinate system (works properly with - css transforms without perspective projection) -*/ - -(function () { - 'use strict' - - var I = (typeof(WebKitCSSMatrix) == 'undefined') ? new DOMMatrix() : new WebKitCSSMatrix() - - function Point(x, y, z) { - this.x = x - this.y = y - this.z = z - } - - Point.prototype.transformBy = function (matrix) { - var tmp = matrix.multiply(I.translate(this.x, this.y, this.z)) - return new Point(tmp.m41, tmp.m42, tmp.m43) - } - - function createMatrix(transform) { - try { - return (typeof(WebKitCSSMatrix) == 'undefined') ? new DOMMatrix(transform) : new WebKitCSSMatrix(transform) - } catch(e) { - console.warn(transform) - console.warn(e.toString()) - return I - } - } - - function getTransformationMatrix(element) { - var transformationMatrix = I - var x = element - - while (x != undefined && x !== x.ownerDocument.documentElement) { - var computedStyle = window.getComputedStyle(x, undefined) - var transform = computedStyle.transform || 'none' - var c = transform === 'none' ? I : createMatrix(transform) - transformationMatrix = c.multiply(transformationMatrix) - x = x.parentNode - } - - var w = element.offsetWidth - var h = element.offsetHeight - var i = 4 - var left = +Infinity - var top = +Infinity - while (--i >= 0) { - var p = new Point(i === 0 || i === 1 ? 0 : w, i === 0 || i === 3 ? 0 : h, - 0).transformBy(transformationMatrix) - if (p.x < left) { - left = p.x - } - if (p.y < top) { - top = p.y - } - } - var rect = element.getBoundingClientRect() - transformationMatrix = I.translate(window.pageXOffset + rect.left - left, - window.pageYOffset + rect.top - top, 0) - .multiply(transformationMatrix) - return transformationMatrix - } - - window.convertPointFromPageToNode = function (element, pageX, pageY) { - return new Point(pageX, pageY, 0).transformBy( - getTransformationMatrix(element).inverse()) - } - - window.convertPointFromNodeToPage = function (element, offsetX, offsetY) { - return new Point(offsetX, offsetY, 0).transformBy( - getTransformationMatrix(element)) - } - -}()) +/*jslint plusplus: true, vars: true, indent: 2 */ +/* convertPointFromPageToNode.js from + + + convertPointFromPageToNode(element, event.pageX, event.pageY) -> {x, y} + returns coordinate in element's local coordinate system (works properly + with css transforms without perspective projection) + convertPointFromNodeToPage(element, offsetX, offsetY) -> {x, y} + returns coordinate in window's coordinate system (works properly with + css transforms without perspective projection) +*/ + +(function () { + 'use strict' + + var I = (typeof(WebKitCSSMatrix) == 'undefined') ? new DOMMatrix() : new WebKitCSSMatrix() + + function Point(x, y, z) { + this.x = x + this.y = y + this.z = z + } + + Point.prototype.transformBy = function (matrix) { + var tmp = matrix.multiply(I.translate(this.x, this.y, this.z)) + return new Point(tmp.m41, tmp.m42, tmp.m43) + } + + function createMatrix(transform) { + try { + return (typeof(WebKitCSSMatrix) == 'undefined') ? new DOMMatrix(transform) : new WebKitCSSMatrix(transform) + } catch(e) { + console.warn(transform) + console.warn(e.toString()) + return I + } + } + + function getTransformationMatrix(element) { + var transformationMatrix = I + var x = element + + while (x != undefined && x !== x.ownerDocument.documentElement) { + var computedStyle = window.getComputedStyle(x, undefined) + var transform = computedStyle.transform || 'none' + var c = transform === 'none' ? I : createMatrix(transform) + transformationMatrix = c.multiply(transformationMatrix) + x = x.parentNode + } + + var w = element.offsetWidth + var h = element.offsetHeight + var i = 4 + var left = +Infinity + var top = +Infinity + while (--i >= 0) { + var p = new Point(i === 0 || i === 1 ? 0 : w, i === 0 || i === 3 ? 0 : h, + 0).transformBy(transformationMatrix) + if (p.x < left) { + left = p.x + } + if (p.y < top) { + top = p.y + } + } + var rect = element.getBoundingClientRect() + transformationMatrix = I.translate(window.pageXOffset + rect.left - left, + window.pageYOffset + rect.top - top, 0) + .multiply(transformationMatrix) + return transformationMatrix + } + + window.convertPointFromPageToNode = function (element, pageX, pageY) { + return new Point(pageX, pageY, 0).transformBy( + getTransformationMatrix(element).inverse()) + } + + window.convertPointFromNodeToPage = function (element, offsetX, offsetY) { + return new Point(offsetX, offsetY, 0).transformBy( + getTransformationMatrix(element)) + } + +}()) diff --git a/lib/app.html b/lib/app.html index 188fe64..e321874 100644 --- a/lib/app.html +++ b/lib/app.html @@ -1,55 +1,54 @@ + - - - - - - + + + + + + - -

- Application -

-

- IWM Browser Applications follow a common three phase pattern, shared by - many programming environments as diverse as Processing, Arduino, Intern, etc. -

- This pattern is reflected by the IApp Interface: -

+ + +

+ Application +

+

+ IWM Browser Applications follow a common three phase pattern, shared by many programming environments as diverse as Processing, Arduino, Intern, etc. +

+ This pattern is reflected by the IApp Interface: +


 class IApp extends Interface {
     setup() { return this }
     run() { return this }
 }
 
-

In practice the pattern may be more complex, because the setup phase can only be entered -after loading things, a main loop cannot be entered because requirements are not met, etc. -But the basic structure is always the same: -

- -

The setup and run methods can also be chained: -

- +

In practice the pattern may be more complex, because the setup phase can only be entered after loading things, a main loop cannot be entered because requirements are not met, etc. But the basic structure is always the same: +

+ +

The setup and run methods can also be chained: +

+ -

-References -

- - +

+ References +

+ + \ No newline at end of file diff --git a/lib/capabilities.html b/lib/capabilities.html index c6feda9..c98aae1 100644 --- a/lib/capabilities.html +++ b/lib/capabilities.html @@ -3,10 +3,10 @@ Doctests Capabilities - + - - + +
diff --git a/lib/coordinates.html b/lib/coordinates.html index ceead6c..d5c1386 100644 --- a/lib/coordinates.html +++ b/lib/coordinates.html @@ -4,11 +4,11 @@ Coordinates Doctest - + - + - - + + +
diff --git a/lib/electron.html b/lib/electron.html index b874994..90e4235 100644 --- a/lib/electron.html +++ b/lib/electron.html @@ -3,11 +3,11 @@ Electron Node.js Test - + - - - + + +
diff --git a/lib/events.html b/lib/events.html index fe0bf1a..29e7428 100644 --- a/lib/events.html +++ b/lib/events.html @@ -2,11 +2,11 @@ - + - - - + + +

diff --git a/lib/examples/memory/index.html b/lib/examples/memory/index.html index 48e94d2..dde12c7 100755 --- a/lib/examples/memory/index.html +++ b/lib/examples/memory/index.html @@ -50,7 +50,7 @@ } - + diff --git a/lib/examples/multitouch.html b/lib/examples/multitouch.html index dbab4b9..c794e10 100755 --- a/lib/examples/multitouch.html +++ b/lib/examples/multitouch.html @@ -50,7 +50,7 @@ } - + diff --git a/lib/flippable.html b/lib/flippable.html index d4f302e..7a44da7 100644 --- a/lib/flippable.html +++ b/lib/flippable.html @@ -3,10 +3,10 @@ Flippable Doctest - + - - + + diff --git a/lib/frames.html b/lib/frames.html index 9f08656..4b255f7 100644 --- a/lib/frames.html +++ b/lib/frames.html @@ -3,11 +3,11 @@ - + - - - + + +

diff --git a/lib/imageloader.html b/lib/imageloader.html index 811099c..6823e00 100644 --- a/lib/imageloader.html +++ b/lib/imageloader.html @@ -2,13 +2,13 @@ - + - - + + - + diff --git a/lib/index.html b/lib/index.html index da118e7..fcdfe47 100644 --- a/lib/index.html +++ b/lib/index.html @@ -1,10 +1,16 @@ - + + - Lib Doctests + Lib Doctests + - + + + + +