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.
-
-
Instantiate: Initialize the application, in this case a singleton and it's instance variables
-
Setup: Build more complex parts of the application, by loading data, creating the UI...
-
Run: Enter and run the main loop of the application.
-
- 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.
+
+
Instantiate: Initialize the application, in this case a singleton and it's instance variables
+
Setup: Build more complex parts of the application, by loading data, creating the UI...
+
Run: Enter and run the main loop of the application.
+
+ 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:
+