@qooxdoo/framework 7.0.0-beta.6 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1555) hide show
  1. package/CHANGELOG.md +0 -6
  2. package/Manifest.json +2 -2
  3. package/README.md +3 -1
  4. package/lib/compiler/compile-info.json +57 -55
  5. package/lib/compiler/index.js +6272 -4273
  6. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
  7. package/lib/resource/qx/tool/loadsass.js +16 -15
  8. package/lib/resource/qx/tool/schema/compile-1-0-0.json +13 -13
  9. package/lib/resource/qx/tool/website/build/assets/bluebird.min.js +4593 -9
  10. package/lib/resource/qx/tool/website/build/assets/buttons.js +391 -1
  11. package/lib/resource/qx/tool/website/build/assets/fontawesome-all.js +8963 -1
  12. package/lib/resource/qx/tool/website/build/assets/jquery.js +5452 -3
  13. package/lib/resource/qx/tool/website/build/diagnostics/dependson.js +31 -31
  14. package/lib/resource/qx/tool/website/build/diagnostics/requiredby.js +32 -36
  15. package/lib/resource/qx/tool/website/build/scripts/serve.js +87 -66
  16. package/lib/resource/qx/tool/website/src/assets/bluebird.min.js +4593 -9
  17. package/lib/resource/qx/tool/website/src/assets/buttons.js +391 -1
  18. package/lib/resource/qx/tool/website/src/assets/fontawesome-all.js +8963 -1
  19. package/lib/resource/qx/tool/website/src/assets/jquery.js +5452 -3
  20. package/lib/resource/qx/tool/website/src/diagnostics/dependson.js +31 -31
  21. package/lib/resource/qx/tool/website/src/diagnostics/requiredby.js +32 -36
  22. package/lib/resource/qx/tool/website/src/scripts/serve.js +87 -66
  23. package/npm-shrinkwrap.json +7293 -0
  24. package/package.json +6 -4
  25. package/source/class/q.js +4 -2
  26. package/source/class/qx/Annotation.js +48 -57
  27. package/source/class/qx/Bootstrap.js +206 -207
  28. package/source/class/qx/Class.js +602 -504
  29. package/source/class/qx/Interface.js +169 -137
  30. package/source/class/qx/Mixin.js +162 -120
  31. package/source/class/qx/Part.js +48 -77
  32. package/source/class/qx/Promise.js +5891 -4655
  33. package/source/class/qx/Theme.js +200 -134
  34. package/source/class/qx/__init__.js +8 -8
  35. package/source/class/qx/application/AbstractGui.js +20 -32
  36. package/source/class/qx/application/Basic.js +9 -18
  37. package/source/class/qx/application/IApplication.js +6 -10
  38. package/source/class/qx/application/Inline.js +4 -7
  39. package/source/class/qx/application/Mobile.js +22 -45
  40. package/source/class/qx/application/Native.js +8 -19
  41. package/source/class/qx/application/Routing.js +88 -114
  42. package/source/class/qx/application/Standalone.js +4 -9
  43. package/source/class/qx/application/__init__.js +1 -1
  44. package/source/class/qx/bom/AnimationFrame.js +26 -25
  45. package/source/class/qx/bom/Blocker.js +92 -100
  46. package/source/class/qx/bom/Cookie.js +18 -22
  47. package/source/class/qx/bom/Document.js +24 -31
  48. package/source/class/qx/bom/Element.js +65 -51
  49. package/source/class/qx/bom/Event.js +68 -78
  50. package/source/class/qx/bom/FileReader.js +110 -115
  51. package/source/class/qx/bom/Font.js +82 -122
  52. package/source/class/qx/bom/FullScreen.js +32 -41
  53. package/source/class/qx/bom/GeoLocation.js +39 -44
  54. package/source/class/qx/bom/HashHistory.js +58 -64
  55. package/source/class/qx/bom/History.js +61 -89
  56. package/source/class/qx/bom/Html.js +75 -71
  57. package/source/class/qx/bom/IdleCallback.js +20 -23
  58. package/source/class/qx/bom/Iframe.js +37 -69
  59. package/source/class/qx/bom/IframeHistory.js +83 -88
  60. package/source/class/qx/bom/Input.js +50 -66
  61. package/source/class/qx/bom/Label.js +65 -86
  62. package/source/class/qx/bom/Lifecycle.js +7 -9
  63. package/source/class/qx/bom/MediaQuery.js +324 -307
  64. package/source/class/qx/bom/NativeHistory.js +51 -46
  65. package/source/class/qx/bom/Notification.js +41 -47
  66. package/source/class/qx/bom/PageVisibility.js +19 -25
  67. package/source/class/qx/bom/Range.js +20 -30
  68. package/source/class/qx/bom/Selection.js +163 -172
  69. package/source/class/qx/bom/Selector.js +2401 -2181
  70. package/source/class/qx/bom/Shortcut.js +103 -129
  71. package/source/class/qx/bom/Storage.js +9 -8
  72. package/source/class/qx/bom/String.js +285 -290
  73. package/source/class/qx/bom/Style.js +30 -31
  74. package/source/class/qx/bom/Stylesheet.js +36 -60
  75. package/source/class/qx/bom/Template.js +730 -657
  76. package/source/class/qx/bom/Viewport.js +40 -46
  77. package/source/class/qx/bom/Vml.js +43 -28
  78. package/source/class/qx/bom/WebWorker.js +61 -50
  79. package/source/class/qx/bom/Window.js +88 -105
  80. package/source/class/qx/bom/__init__.js +11 -11
  81. package/source/class/qx/bom/client/Browser.js +45 -47
  82. package/source/class/qx/bom/client/Css.js +85 -85
  83. package/source/class/qx/bom/client/CssAnimation.js +41 -49
  84. package/source/class/qx/bom/client/CssTransform.js +21 -29
  85. package/source/class/qx/bom/client/CssTransition.js +9 -12
  86. package/source/class/qx/bom/client/Device.js +45 -45
  87. package/source/class/qx/bom/client/EcmaScript.js +153 -96
  88. package/source/class/qx/bom/client/Engine.js +38 -35
  89. package/source/class/qx/bom/client/Event.js +75 -63
  90. package/source/class/qx/bom/client/Html.js +97 -97
  91. package/source/class/qx/bom/client/Idle.js +4 -6
  92. package/source/class/qx/bom/client/Locale.js +15 -15
  93. package/source/class/qx/bom/client/OperatingSystem.js +89 -106
  94. package/source/class/qx/bom/client/Pdfjs.js +1364 -1067
  95. package/source/class/qx/bom/client/PhoneGap.js +6 -9
  96. package/source/class/qx/bom/client/Plugin.js +93 -97
  97. package/source/class/qx/bom/client/Runtime.js +14 -12
  98. package/source/class/qx/bom/client/Scroll.js +20 -16
  99. package/source/class/qx/bom/client/Stylesheet.js +44 -32
  100. package/source/class/qx/bom/client/Transport.js +38 -41
  101. package/source/class/qx/bom/client/Xml.js +39 -41
  102. package/source/class/qx/bom/client/__init__.js +4 -4
  103. package/source/class/qx/bom/element/Animation.js +15 -12
  104. package/source/class/qx/bom/element/AnimationCss.js +95 -64
  105. package/source/class/qx/bom/element/AnimationHandle.js +22 -29
  106. package/source/class/qx/bom/element/AnimationJs.js +94 -71
  107. package/source/class/qx/bom/element/Attribute.js +119 -134
  108. package/source/class/qx/bom/element/Background.js +35 -35
  109. package/source/class/qx/bom/element/BoxSizing.js +43 -44
  110. package/source/class/qx/bom/element/Class.js +50 -72
  111. package/source/class/qx/bom/element/Clip.js +36 -60
  112. package/source/class/qx/bom/element/Cursor.js +13 -20
  113. package/source/class/qx/bom/element/Dataset.js +33 -31
  114. package/source/class/qx/bom/element/Decoration.js +178 -168
  115. package/source/class/qx/bom/element/Dimension.js +78 -60
  116. package/source/class/qx/bom/element/Location.js +87 -94
  117. package/source/class/qx/bom/element/Opacity.js +42 -44
  118. package/source/class/qx/bom/element/Scroll.js +78 -88
  119. package/source/class/qx/bom/element/Style.js +61 -101
  120. package/source/class/qx/bom/element/Transform.js +38 -56
  121. package/source/class/qx/bom/element/__init__.js +4 -4
  122. package/source/class/qx/bom/media/Abstract.js +136 -143
  123. package/source/class/qx/bom/media/Audio.js +7 -12
  124. package/source/class/qx/bom/media/Video.js +15 -27
  125. package/source/class/qx/bom/request/IRequest.js +18 -21
  126. package/source/class/qx/bom/request/Jsonp.js +34 -39
  127. package/source/class/qx/bom/request/Script.js +94 -90
  128. package/source/class/qx/bom/request/SimpleXhr.js +111 -79
  129. package/source/class/qx/bom/request/Xhr.js +196 -143
  130. package/source/class/qx/bom/request/__init__.js +1 -1
  131. package/source/class/qx/bom/rest/Resource.js +269 -203
  132. package/source/class/qx/bom/storage/Memory.js +18 -29
  133. package/source/class/qx/bom/storage/UserData.js +28 -35
  134. package/source/class/qx/bom/storage/Web.js +19 -30
  135. package/source/class/qx/bom/webfonts/Manager.js +199 -130
  136. package/source/class/qx/bom/webfonts/Validator.js +84 -118
  137. package/source/class/qx/bom/webfonts/WebFont.js +24 -28
  138. package/source/class/qx/bom/webfonts/__init__.js +1 -1
  139. package/source/class/qx/core/Aspect.js +15 -22
  140. package/source/class/qx/core/Assert.js +391 -333
  141. package/source/class/qx/core/AssertionError.js +6 -15
  142. package/source/class/qx/core/BaseInit.js +25 -28
  143. package/source/class/qx/core/Environment.js +72 -86
  144. package/source/class/qx/core/GlobalError.js +12 -20
  145. package/source/class/qx/core/IDisposable.js +6 -9
  146. package/source/class/qx/core/Id.js +25 -15
  147. package/source/class/qx/core/Init.js +20 -20
  148. package/source/class/qx/core/MAssert.js +54 -97
  149. package/source/class/qx/core/MBindTo.js +10 -14
  150. package/source/class/qx/core/MEvent.js +76 -65
  151. package/source/class/qx/core/MLogging.js +9 -18
  152. package/source/class/qx/core/MObjectId.js +104 -65
  153. package/source/class/qx/core/MProperty.js +18 -34
  154. package/source/class/qx/core/Object.js +93 -122
  155. package/source/class/qx/core/ObjectRegistry.js +58 -81
  156. package/source/class/qx/core/Property.js +974 -780
  157. package/source/class/qx/core/ValidationError.js +3 -4
  158. package/source/class/qx/core/WindowError.js +13 -24
  159. package/source/class/qx/core/Wrapper.js +8 -9
  160. package/source/class/qx/data/Array.js +178 -191
  161. package/source/class/qx/data/Conversion.js +11 -18
  162. package/source/class/qx/data/IListData.js +11 -20
  163. package/source/class/qx/data/MBinding.js +31 -26
  164. package/source/class/qx/data/SingleValueBinding.js +491 -225
  165. package/source/class/qx/data/__init__.js +1 -1
  166. package/source/class/qx/data/controller/CheckedList.js +82 -54
  167. package/source/class/qx/data/controller/Form.js +81 -69
  168. package/source/class/qx/data/controller/IControllerDelegate.js +7 -12
  169. package/source/class/qx/data/controller/ISelection.js +6 -10
  170. package/source/class/qx/data/controller/List.js +151 -167
  171. package/source/class/qx/data/controller/MSelection.js +53 -72
  172. package/source/class/qx/data/controller/Object.js +106 -77
  173. package/source/class/qx/data/controller/Tree.js +164 -142
  174. package/source/class/qx/data/controller/__init__.js +1 -1
  175. package/source/class/qx/data/controller/website/List.js +34 -43
  176. package/source/class/qx/data/controller/website/__init__.js +2 -2
  177. package/source/class/qx/data/marshal/IMarshaler.js +4 -7
  178. package/source/class/qx/data/marshal/IMarshalerDelegate.js +10 -18
  179. package/source/class/qx/data/marshal/Json.js +112 -85
  180. package/source/class/qx/data/marshal/MEventBubbling.js +44 -42
  181. package/source/class/qx/data/marshal/__init__.js +1 -1
  182. package/source/class/qx/data/store/IStoreDelegate.js +6 -9
  183. package/source/class/qx/data/store/Json.js +71 -85
  184. package/source/class/qx/data/store/Jsonp.js +19 -25
  185. package/source/class/qx/data/store/Offline.js +21 -29
  186. package/source/class/qx/data/store/Rest.js +25 -23
  187. package/source/class/qx/data/store/__init__.js +1 -1
  188. package/source/class/qx/dev/Debug.js +105 -124
  189. package/source/class/qx/dev/FakeServer.js +68 -65
  190. package/source/class/qx/dev/ObjectSummary.js +33 -39
  191. package/source/class/qx/dev/Profile.js +62 -63
  192. package/source/class/qx/dev/StackTrace.js +64 -70
  193. package/source/class/qx/dev/Tokenizer.js +114 -126
  194. package/source/class/qx/dev/unit/AbstractTestSuite.js +17 -31
  195. package/source/class/qx/dev/unit/AsyncWrapper.js +22 -26
  196. package/source/class/qx/dev/unit/JsUnitTestResult.js +9 -21
  197. package/source/class/qx/dev/unit/MMeasure.js +46 -37
  198. package/source/class/qx/dev/unit/MMock.js +236 -240
  199. package/source/class/qx/dev/unit/MRequirements.js +53 -79
  200. package/source/class/qx/dev/unit/MRequirementsBasic.js +24 -19
  201. package/source/class/qx/dev/unit/MTestLoader.js +52 -57
  202. package/source/class/qx/dev/unit/MeasurementResult.js +18 -22
  203. package/source/class/qx/dev/unit/RequirementError.js +8 -17
  204. package/source/class/qx/dev/unit/Sinon.js +18826 -4613
  205. package/source/class/qx/dev/unit/TestCase.js +40 -51
  206. package/source/class/qx/dev/unit/TestClass.js +22 -23
  207. package/source/class/qx/dev/unit/TestFunction.js +28 -48
  208. package/source/class/qx/dev/unit/TestLoader.js +11 -14
  209. package/source/class/qx/dev/unit/TestLoaderBasic.js +3 -6
  210. package/source/class/qx/dev/unit/TestLoaderInline.js +8 -14
  211. package/source/class/qx/dev/unit/TestLoaderMobile.js +8 -14
  212. package/source/class/qx/dev/unit/TestLoaderNative.js +7 -13
  213. package/source/class/qx/dev/unit/TestResult.js +140 -118
  214. package/source/class/qx/dev/unit/TestSuite.js +46 -55
  215. package/source/class/qx/dom/Element.js +29 -74
  216. package/source/class/qx/dom/Hierarchy.js +60 -95
  217. package/source/class/qx/dom/Node.js +54 -81
  218. package/source/class/qx/dom/__init__.js +9 -9
  219. package/source/class/qx/event/AcceleratingTimer.js +28 -46
  220. package/source/class/qx/event/Emitter.js +54 -49
  221. package/source/class/qx/event/GlobalError.js +22 -38
  222. package/source/class/qx/event/IEventDispatcher.js +4 -9
  223. package/source/class/qx/event/IEventHandler.js +7 -13
  224. package/source/class/qx/event/Idle.js +32 -47
  225. package/source/class/qx/event/Manager.js +222 -237
  226. package/source/class/qx/event/Messaging.js +55 -48
  227. package/source/class/qx/event/Pool.js +5 -8
  228. package/source/class/qx/event/Registration.js +128 -118
  229. package/source/class/qx/event/Timer.js +50 -96
  230. package/source/class/qx/event/Utils.js +41 -28
  231. package/source/class/qx/event/dispatch/AbstractBubbling.js +133 -93
  232. package/source/class/qx/event/dispatch/Direct.js +46 -51
  233. package/source/class/qx/event/dispatch/DomBubbling.js +8 -15
  234. package/source/class/qx/event/dispatch/MouseCapture.js +74 -91
  235. package/source/class/qx/event/handler/Appear.js +40 -77
  236. package/source/class/qx/event/handler/Application.js +100 -126
  237. package/source/class/qx/event/handler/Capture.js +15 -37
  238. package/source/class/qx/event/handler/DragDrop.js +342 -228
  239. package/source/class/qx/event/handler/Element.js +45 -72
  240. package/source/class/qx/event/handler/ElementResize.js +35 -70
  241. package/source/class/qx/event/handler/Focus.js +908 -637
  242. package/source/class/qx/event/handler/Gesture.js +144 -93
  243. package/source/class/qx/event/handler/GestureCore.js +214 -163
  244. package/source/class/qx/event/handler/Iframe.js +21 -35
  245. package/source/class/qx/event/handler/Input.js +332 -209
  246. package/source/class/qx/event/handler/Keyboard.js +325 -270
  247. package/source/class/qx/event/handler/Mouse.js +212 -173
  248. package/source/class/qx/event/handler/Object.js +13 -31
  249. package/source/class/qx/event/handler/Offline.js +52 -67
  250. package/source/class/qx/event/handler/Orientation.js +56 -62
  251. package/source/class/qx/event/handler/OrientationCore.js +33 -43
  252. package/source/class/qx/event/handler/Pointer.js +84 -72
  253. package/source/class/qx/event/handler/PointerCore.js +183 -105
  254. package/source/class/qx/event/handler/Touch.js +43 -59
  255. package/source/class/qx/event/handler/TouchCore.js +159 -120
  256. package/source/class/qx/event/handler/Transition.js +91 -100
  257. package/source/class/qx/event/handler/UserAction.js +18 -42
  258. package/source/class/qx/event/handler/Video.js +12 -12
  259. package/source/class/qx/event/handler/Window.js +53 -69
  260. package/source/class/qx/event/message/Bus.js +109 -128
  261. package/source/class/qx/event/message/Message.js +14 -29
  262. package/source/class/qx/event/type/Data.js +11 -22
  263. package/source/class/qx/event/type/Dom.js +37 -52
  264. package/source/class/qx/event/type/Drag.js +37 -56
  265. package/source/class/qx/event/type/Event.js +80 -104
  266. package/source/class/qx/event/type/Focus.js +5 -8
  267. package/source/class/qx/event/type/GeoPosition.js +32 -41
  268. package/source/class/qx/event/type/KeyInput.js +9 -19
  269. package/source/class/qx/event/type/KeySequence.js +10 -21
  270. package/source/class/qx/event/type/Mouse.js +69 -72
  271. package/source/class/qx/event/type/MouseWheel.js +5 -9
  272. package/source/class/qx/event/type/Native.js +16 -27
  273. package/source/class/qx/event/type/Orientation.js +18 -30
  274. package/source/class/qx/event/type/Pinch.js +21 -27
  275. package/source/class/qx/event/type/Pointer.js +38 -41
  276. package/source/class/qx/event/type/Rest.js +7 -10
  277. package/source/class/qx/event/type/Roll.js +49 -58
  278. package/source/class/qx/event/type/Rotate.js +21 -27
  279. package/source/class/qx/event/type/Swipe.js +75 -86
  280. package/source/class/qx/event/type/Tap.js +2 -4
  281. package/source/class/qx/event/type/Touch.js +262 -286
  282. package/source/class/qx/event/type/Track.js +23 -28
  283. package/source/class/qx/event/type/dom/Custom.js +24 -20
  284. package/source/class/qx/event/type/dom/Pointer.js +86 -60
  285. package/source/class/qx/event/util/Keyboard.js +94 -106
  286. package/source/class/qx/html/Blocker.js +17 -18
  287. package/source/class/qx/html/Canvas.js +13 -29
  288. package/source/class/qx/html/Element.js +372 -497
  289. package/source/class/qx/html/Factory.js +31 -26
  290. package/source/class/qx/html/Iframe.js +35 -69
  291. package/source/class/qx/html/Image.js +43 -55
  292. package/source/class/qx/html/Input.js +44 -57
  293. package/source/class/qx/html/Jsx.js +49 -41
  294. package/source/class/qx/html/JsxRef.js +3 -5
  295. package/source/class/qx/html/Label.js +20 -32
  296. package/source/class/qx/html/Node.js +362 -422
  297. package/source/class/qx/html/Root.js +7 -16
  298. package/source/class/qx/html/Text.js +34 -27
  299. package/source/class/qx/io/ImageLoader.js +66 -90
  300. package/source/class/qx/io/PartLoader.js +17 -30
  301. package/source/class/qx/io/exception/Cancel.js +4 -5
  302. package/source/class/qx/io/exception/Exception.js +4 -5
  303. package/source/class/qx/io/exception/Protocol.js +2 -3
  304. package/source/class/qx/io/exception/Transport.js +13 -14
  305. package/source/class/qx/io/graphql/Client.js +22 -12
  306. package/source/class/qx/io/graphql/protocol/Message.js +3 -3
  307. package/source/class/qx/io/graphql/protocol/Request.js +8 -10
  308. package/source/class/qx/io/graphql/protocol/Response.js +7 -5
  309. package/source/class/qx/io/jsonrpc/Client.js +70 -38
  310. package/source/class/qx/io/jsonrpc/__init__.js +1 -1
  311. package/source/class/qx/io/jsonrpc/protocol/Batch.js +14 -8
  312. package/source/class/qx/io/jsonrpc/protocol/Error.js +11 -9
  313. package/source/class/qx/io/jsonrpc/protocol/Message.js +3 -3
  314. package/source/class/qx/io/jsonrpc/protocol/Notification.js +8 -6
  315. package/source/class/qx/io/jsonrpc/protocol/Parser.js +33 -9
  316. package/source/class/qx/io/jsonrpc/protocol/Request.js +8 -7
  317. package/source/class/qx/io/jsonrpc/protocol/Result.js +7 -6
  318. package/source/class/qx/io/part/ClosurePart.js +16 -35
  319. package/source/class/qx/io/part/Package.js +35 -63
  320. package/source/class/qx/io/part/Part.js +29 -53
  321. package/source/class/qx/io/part/__init__.js +4 -4
  322. package/source/class/qx/io/request/AbstractRequest.js +268 -201
  323. package/source/class/qx/io/request/Jsonp.js +16 -19
  324. package/source/class/qx/io/request/Xhr.js +38 -37
  325. package/source/class/qx/io/request/__init__.js +1 -1
  326. package/source/class/qx/io/request/authentication/Basic.js +7 -13
  327. package/source/class/qx/io/request/authentication/Bearer.js +7 -13
  328. package/source/class/qx/io/request/authentication/IAuthentication.js +3 -6
  329. package/source/class/qx/io/request/authentication/__init__.js +1 -1
  330. package/source/class/qx/io/rest/Resource.js +122 -90
  331. package/source/class/qx/io/transport/AbstractClient.js +31 -10
  332. package/source/class/qx/io/transport/AbstractTransport.js +7 -8
  333. package/source/class/qx/io/transport/Fetch.js +8 -5
  334. package/source/class/qx/io/transport/ITransport.js +4 -2
  335. package/source/class/qx/io/transport/PostMessage.js +1 -2
  336. package/source/class/qx/io/transport/Websocket.js +5 -5
  337. package/source/class/qx/io/transport/Xhr.js +17 -18
  338. package/source/class/qx/lang/Array.js +133 -170
  339. package/source/class/qx/lang/Function.js +101 -104
  340. package/source/class/qx/lang/Json.js +1041 -774
  341. package/source/class/qx/lang/Number.js +11 -16
  342. package/source/class/qx/lang/Object.js +129 -100
  343. package/source/class/qx/lang/String.js +86 -94
  344. package/source/class/qx/lang/Type.js +44 -65
  345. package/source/class/qx/lang/normalize/Array.js +39 -49
  346. package/source/class/qx/lang/normalize/Date.js +50 -32
  347. package/source/class/qx/lang/normalize/Error.js +4 -7
  348. package/source/class/qx/lang/normalize/Function.js +11 -19
  349. package/source/class/qx/lang/normalize/Number.js +3 -5
  350. package/source/class/qx/lang/normalize/Object.js +17 -18
  351. package/source/class/qx/lang/normalize/String.js +39 -40
  352. package/source/class/qx/locale/Date.js +175 -178
  353. package/source/class/qx/locale/Key.js +13 -11
  354. package/source/class/qx/locale/LocalizedString.js +18 -15
  355. package/source/class/qx/locale/MTranslation.js +22 -23
  356. package/source/class/qx/locale/Manager.js +62 -100
  357. package/source/class/qx/locale/Number.js +20 -12
  358. package/source/class/qx/locale/String.js +26 -15
  359. package/source/class/qx/log/Logger.js +128 -180
  360. package/source/class/qx/log/__init__.js +3 -3
  361. package/source/class/qx/log/appender/Console.js +100 -111
  362. package/source/class/qx/log/appender/Element.js +25 -39
  363. package/source/class/qx/log/appender/Formatter.js +117 -66
  364. package/source/class/qx/log/appender/Native.js +4 -10
  365. package/source/class/qx/log/appender/NodeConsole.js +20 -28
  366. package/source/class/qx/log/appender/PhoneGap.js +5 -13
  367. package/source/class/qx/log/appender/RhinoConsole.js +12 -23
  368. package/source/class/qx/log/appender/RhinoFile.js +19 -26
  369. package/source/class/qx/log/appender/RingBuffer.js +10 -19
  370. package/source/class/qx/log/appender/Util.js +11 -9
  371. package/source/class/qx/module/Animation.js +73 -63
  372. package/source/class/qx/module/Attribute.js +27 -46
  373. package/source/class/qx/module/Blocker.js +33 -41
  374. package/source/class/qx/module/Cookie.js +6 -10
  375. package/source/class/qx/module/Css.js +82 -97
  376. package/source/class/qx/module/Dataset.js +12 -24
  377. package/source/class/qx/module/Environment.js +4 -6
  378. package/source/class/qx/module/Event.js +124 -127
  379. package/source/class/qx/module/Io.js +5 -9
  380. package/source/class/qx/module/Manipulating.js +98 -117
  381. package/source/class/qx/module/MatchMedia.js +50 -24
  382. package/source/class/qx/module/Messaging.js +6 -10
  383. package/source/class/qx/module/Placeholder.js +54 -44
  384. package/source/class/qx/module/Placement.js +33 -33
  385. package/source/class/qx/module/Rest.js +3 -4
  386. package/source/class/qx/module/Storage.js +34 -48
  387. package/source/class/qx/module/Template.js +6 -9
  388. package/source/class/qx/module/TextSelection.js +13 -21
  389. package/source/class/qx/module/Transform.js +28 -45
  390. package/source/class/qx/module/Traversing.js +160 -154
  391. package/source/class/qx/module/__init__.js +1 -1
  392. package/source/class/qx/module/dev/FakeServer.js +19 -25
  393. package/source/class/qx/module/event/GestureHandler.js +25 -13
  394. package/source/class/qx/module/event/Keyboard.js +42 -31
  395. package/source/class/qx/module/event/Mouse.js +48 -46
  396. package/source/class/qx/module/event/Native.js +18 -30
  397. package/source/class/qx/module/event/Orientation.js +11 -18
  398. package/source/class/qx/module/event/OrientationHandler.js +19 -17
  399. package/source/class/qx/module/event/Pinch.js +13 -14
  400. package/source/class/qx/module/event/Pointer.js +22 -22
  401. package/source/class/qx/module/event/PointerHandler.js +14 -11
  402. package/source/class/qx/module/event/Rotate.js +13 -14
  403. package/source/class/qx/module/event/Swipe.js +18 -24
  404. package/source/class/qx/module/event/Tap.js +25 -25
  405. package/source/class/qx/module/event/Touch.js +4 -7
  406. package/source/class/qx/module/event/TouchHandler.js +16 -16
  407. package/source/class/qx/module/event/Track.js +13 -14
  408. package/source/class/qx/module/util/Array.js +30 -41
  409. package/source/class/qx/module/util/Function.js +1 -2
  410. package/source/class/qx/module/util/Object.js +8 -11
  411. package/source/class/qx/module/util/String.js +10 -18
  412. package/source/class/qx/module/util/Type.js +3 -4
  413. package/source/class/qx/test/Annotation.js +195 -89
  414. package/source/class/qx/test/Bootstrap.js +98 -124
  415. package/source/class/qx/test/Browser.js +8 -11
  416. package/source/class/qx/test/Class.js +164 -198
  417. package/source/class/qx/test/Dom.js +10 -28
  418. package/source/class/qx/test/EditDistance.js +16 -16
  419. package/source/class/qx/test/Interface.js +380 -383
  420. package/source/class/qx/test/MAppearance.js +10 -14
  421. package/source/class/qx/test/MDecoration.js +1 -3
  422. package/source/class/qx/test/Mixin.js +449 -173
  423. package/source/class/qx/test/Promise.js +422 -333
  424. package/source/class/qx/test/Theme.js +204 -179
  425. package/source/class/qx/test/Xml.js +155 -84
  426. package/source/class/qx/test/application/Routing.js +45 -44
  427. package/source/class/qx/test/bom/AnimationFrame.js +23 -21
  428. package/source/class/qx/test/bom/Attribute.js +66 -47
  429. package/source/class/qx/test/bom/Basic.js +52 -27
  430. package/source/class/qx/test/bom/Blocker.js +100 -70
  431. package/source/class/qx/test/bom/Class.js +19 -34
  432. package/source/class/qx/test/bom/Cookie.js +49 -28
  433. package/source/class/qx/test/bom/Dataset.js +12 -24
  434. package/source/class/qx/test/bom/Element.js +55 -47
  435. package/source/class/qx/test/bom/Event.js +68 -45
  436. package/source/class/qx/test/bom/FileReader.js +6 -12
  437. package/source/class/qx/test/bom/Font.js +256 -118
  438. package/source/class/qx/test/bom/GeoLocation.js +82 -64
  439. package/source/class/qx/test/bom/History.js +63 -84
  440. package/source/class/qx/test/bom/IdleCallback.js +51 -38
  441. package/source/class/qx/test/bom/Iframe.js +14 -18
  442. package/source/class/qx/test/bom/Label.js +74 -105
  443. package/source/class/qx/test/bom/Location.js +70 -99
  444. package/source/class/qx/test/bom/PageVisibility.js +13 -16
  445. package/source/class/qx/test/bom/Selector.js +16 -16
  446. package/source/class/qx/test/bom/String.js +19 -15
  447. package/source/class/qx/test/bom/Stylesheet.js +39 -48
  448. package/source/class/qx/test/bom/Template.js +49 -57
  449. package/source/class/qx/test/bom/Viewport.js +7 -11
  450. package/source/class/qx/test/bom/WebWorker.js +49 -37
  451. package/source/class/qx/test/bom/Window.js +6 -12
  452. package/source/class/qx/test/bom/client/Css.js +26 -19
  453. package/source/class/qx/test/bom/client/Device.js +29 -18
  454. package/source/class/qx/test/bom/client/OperatingSystem.js +17 -20
  455. package/source/class/qx/test/bom/client/Pdfjs.js +15 -13
  456. package/source/class/qx/test/bom/element/AnimationHandle.js +20 -17
  457. package/source/class/qx/test/bom/element/AnimationJs.js +48 -31
  458. package/source/class/qx/test/bom/element/Background.js +93 -46
  459. package/source/class/qx/test/bom/element/BoxSizing.js +66 -61
  460. package/source/class/qx/test/bom/element/Class.js +33 -58
  461. package/source/class/qx/test/bom/element/Dimension.js +58 -37
  462. package/source/class/qx/test/bom/element/Style.js +87 -83
  463. package/source/class/qx/test/bom/element/Transform.js +209 -86
  464. package/source/class/qx/test/bom/media/Audio.js +18 -14
  465. package/source/class/qx/test/bom/media/MediaTestCase.js +61 -66
  466. package/source/class/qx/test/bom/media/Video.js +39 -28
  467. package/source/class/qx/test/bom/request/Jsonp.js +60 -57
  468. package/source/class/qx/test/bom/request/Script.js +150 -138
  469. package/source/class/qx/test/bom/request/SimpleXhr.js +206 -134
  470. package/source/class/qx/test/bom/request/Xhr.js +179 -132
  471. package/source/class/qx/test/bom/request/XhrWithRemote.js +206 -160
  472. package/source/class/qx/test/bom/rest/Resource.js +345 -281
  473. package/source/class/qx/test/bom/rest/ResourceWithRemote.js +74 -57
  474. package/source/class/qx/test/bom/storage/Local.js +3 -4
  475. package/source/class/qx/test/bom/storage/Session.js +3 -4
  476. package/source/class/qx/test/bom/storage/WebStorageTestCase.js +28 -27
  477. package/source/class/qx/test/bom/webfonts/Abstract.js +8 -10
  478. package/source/class/qx/test/bom/webfonts/Manager.js +127 -80
  479. package/source/class/qx/test/bom/webfonts/Validator.js +36 -30
  480. package/source/class/qx/test/compiler/ClassFile.js +29 -11
  481. package/source/class/qx/test/compiler/jsdoc/Parser.js +122 -96
  482. package/source/class/qx/test/core/Assert.js +151 -86
  483. package/source/class/qx/test/core/Environment.js +162 -123
  484. package/source/class/qx/test/core/EventEmitterDummy.js +7 -8
  485. package/source/class/qx/test/core/InheritanceDummy.js +23 -33
  486. package/source/class/qx/test/core/MemoryManagement.js +13 -5
  487. package/source/class/qx/test/core/Object.js +106 -112
  488. package/source/class/qx/test/core/ObjectId.js +7 -6
  489. package/source/class/qx/test/core/Property.js +483 -387
  490. package/source/class/qx/test/core/PropertyHelper.js +49 -64
  491. package/source/class/qx/test/core/Target.js +9 -13
  492. package/source/class/qx/test/core/Validation.js +409 -136
  493. package/source/class/qx/test/data/DataArray.js +1059 -394
  494. package/source/class/qx/test/data/DataArrayWithChangeBubble.js +315 -172
  495. package/source/class/qx/test/data/__init__.js +4 -4
  496. package/source/class/qx/test/data/controller/Form.js +141 -99
  497. package/source/class/qx/test/data/controller/FormWithArrayAndModel.js +66 -51
  498. package/source/class/qx/test/data/controller/List.js +644 -336
  499. package/source/class/qx/test/data/controller/ListReverse.js +64 -63
  500. package/source/class/qx/test/data/controller/ListWithObjects.js +305 -149
  501. package/source/class/qx/test/data/controller/Object.js +252 -94
  502. package/source/class/qx/test/data/controller/Tree.js +1219 -383
  503. package/source/class/qx/test/data/controller/__init__.js +4 -4
  504. package/source/class/qx/test/data/marshal/Json.js +832 -447
  505. package/source/class/qx/test/data/marshal/__init__.js +4 -4
  506. package/source/class/qx/test/data/singlevalue/Array.js +383 -144
  507. package/source/class/qx/test/data/singlevalue/Deep.js +361 -175
  508. package/source/class/qx/test/data/singlevalue/Resolve.js +51 -29
  509. package/source/class/qx/test/data/singlevalue/Simple.js +530 -208
  510. package/source/class/qx/test/data/singlevalue/TextFieldDummy.js +32 -28
  511. package/source/class/qx/test/data/singlevalue/__init__.js +4 -4
  512. package/source/class/qx/test/data/store/Json.js +574 -313
  513. package/source/class/qx/test/data/store/Jsonp.js +103 -77
  514. package/source/class/qx/test/data/store/Offline.js +127 -110
  515. package/source/class/qx/test/data/store/Rest.js +58 -52
  516. package/source/class/qx/test/data/store/RestWithRemote.js +36 -30
  517. package/source/class/qx/test/data/store/__init__.js +4 -4
  518. package/source/class/qx/test/dev/Debug.js +9 -13
  519. package/source/class/qx/test/dev/StackTrace.js +51 -42
  520. package/source/class/qx/test/dev/unit/Requirements.js +36 -49
  521. package/source/class/qx/test/dev/unit/Sinon.js +85 -73
  522. package/source/class/qx/test/dev/unit/TestCase.js +12 -17
  523. package/source/class/qx/test/dom/Element.js +17 -12
  524. package/source/class/qx/test/dom/Hierarchy.js +53 -38
  525. package/source/class/qx/test/dom/Node.js +97 -43
  526. package/source/class/qx/test/event/Bubbling.js +258 -88
  527. package/source/class/qx/test/event/Emitter.js +38 -39
  528. package/source/class/qx/test/event/GlobalError.js +59 -87
  529. package/source/class/qx/test/event/GlobalEventMonitors.js +22 -25
  530. package/source/class/qx/test/event/Messaging.js +66 -49
  531. package/source/class/qx/test/event/MockBubblingHandler.js +10 -15
  532. package/source/class/qx/test/event/MockHandler.js +14 -33
  533. package/source/class/qx/test/event/Registration.js +38 -32
  534. package/source/class/qx/test/event/Timer.js +61 -39
  535. package/source/class/qx/test/event/Utils.js +164 -123
  536. package/source/class/qx/test/event/dispatch/MouseCapture.js +61 -51
  537. package/source/class/qx/test/event/dispatch/MouseEventOnDocument.js +22 -23
  538. package/source/class/qx/test/event/dispatch/TestingHandler.js +8 -10
  539. package/source/class/qx/test/event/dispatch/TestingWindow.js +9 -13
  540. package/source/class/qx/test/event/dispatch/__init__.js +4 -4
  541. package/source/class/qx/test/event/handler/Offline.js +7 -8
  542. package/source/class/qx/test/event/message/Bus.js +112 -72
  543. package/source/class/qx/test/event/message/__init__.js +4 -4
  544. package/source/class/qx/test/event/type/Dom.js +12 -11
  545. package/source/class/qx/test/event/type/Event.js +7 -16
  546. package/source/class/qx/test/event/type/Mouse.js +12 -11
  547. package/source/class/qx/test/event/type/Native.js +12 -11
  548. package/source/class/qx/test/event/type/__init__.js +4 -4
  549. package/source/class/qx/test/event/util/Keyboard.js +4 -3
  550. package/source/class/qx/test/html/Element.js +538 -239
  551. package/source/class/qx/test/html/Iframe.js +85 -73
  552. package/source/class/qx/test/html/jsx/TestJsx.js +15 -4
  553. package/source/class/qx/test/html/jsx/TestJsxBrowser.js +37 -19
  554. package/source/class/qx/test/html/jsx/TestWidget.js +26 -26
  555. package/source/class/qx/test/io/ImageLoader.js +256 -160
  556. package/source/class/qx/test/io/MAssert.js +7 -7
  557. package/source/class/qx/test/io/MRemoteTest.js +9 -11
  558. package/source/class/qx/test/io/__init__.js +4 -4
  559. package/source/class/qx/test/io/graphql/Client.js +135 -114
  560. package/source/class/qx/test/io/graphql/ClientFetch.js +4 -4
  561. package/source/class/qx/test/io/graphql/Request.js +12 -13
  562. package/source/class/qx/test/io/jsonrpc/Client.js +135 -69
  563. package/source/class/qx/test/io/jsonrpc/Protocol.js +42 -14
  564. package/source/class/qx/test/io/request/Jsonp.js +23 -20
  565. package/source/class/qx/test/io/request/JsonpWithRemote.js +25 -22
  566. package/source/class/qx/test/io/request/MRequest.js +137 -114
  567. package/source/class/qx/test/io/request/Xhr.js +367 -209
  568. package/source/class/qx/test/io/request/XhrWithRemote.js +133 -100
  569. package/source/class/qx/test/io/rest/Resource.js +325 -270
  570. package/source/class/qx/test/io/rest/ResourceWithRemote.js +75 -58
  571. package/source/class/qx/test/io/transport/PostMessage.js +5 -5
  572. package/source/class/qx/test/io/transport/Websocket.js +9 -8
  573. package/source/class/qx/test/lang/Array.js +79 -105
  574. package/source/class/qx/test/lang/Function.js +64 -53
  575. package/source/class/qx/test/lang/Json.js +51 -79
  576. package/source/class/qx/test/lang/Number.js +4 -6
  577. package/source/class/qx/test/lang/Object.js +143 -133
  578. package/source/class/qx/test/lang/String.js +151 -95
  579. package/source/class/qx/test/lang/Type.js +34 -44
  580. package/source/class/qx/test/lang/Webkit.js +8 -13
  581. package/source/class/qx/test/lang/normalize/Array.js +121 -68
  582. package/source/class/qx/test/lang/normalize/Date.js +232 -49
  583. package/source/class/qx/test/lang/normalize/Error.js +5 -8
  584. package/source/class/qx/test/lang/normalize/Function.js +7 -13
  585. package/source/class/qx/test/lang/normalize/Object.js +22 -29
  586. package/source/class/qx/test/lang/normalize/String.js +19 -28
  587. package/source/class/qx/test/locale/Date.js +91 -43
  588. package/source/class/qx/test/locale/Locale.js +52 -32
  589. package/source/class/qx/test/locale/LocalizedString.js +12 -12
  590. package/source/class/qx/test/log/DeprecationMethodOverriding.js +52 -31
  591. package/source/class/qx/test/log/Filters.js +6 -3
  592. package/source/class/qx/test/log/Formatter.js +13 -7
  593. package/source/class/qx/test/log/Logger.js +19 -29
  594. package/source/class/qx/test/log/RingBuffer.js +14 -25
  595. package/source/class/qx/test/log/__init__.js +4 -4
  596. package/source/class/qx/test/log/fixture/ClassA.js +22 -22
  597. package/source/class/qx/test/log/fixture/ClassB1.js +7 -9
  598. package/source/class/qx/test/log/fixture/ClassB2.js +5 -7
  599. package/source/class/qx/test/log/fixture/ClassC1.js +5 -7
  600. package/source/class/qx/test/log/fixture/ClassC2.js +7 -9
  601. package/source/class/qx/test/mobile/LocaleSwitch.js +29 -36
  602. package/source/class/qx/test/mobile/MobileTestCase.js +39 -49
  603. package/source/class/qx/test/mobile/basic/Atom.js +129 -53
  604. package/source/class/qx/test/mobile/basic/Image.js +41 -31
  605. package/source/class/qx/test/mobile/basic/Label.js +6 -10
  606. package/source/class/qx/test/mobile/container/Carousel.js +41 -45
  607. package/source/class/qx/test/mobile/container/Composite.js +48 -65
  608. package/source/class/qx/test/mobile/container/Drawer.js +42 -29
  609. package/source/class/qx/test/mobile/container/Navigation.js +14 -20
  610. package/source/class/qx/test/mobile/container/Scroll.js +23 -19
  611. package/source/class/qx/test/mobile/core/Widget.js +150 -86
  612. package/source/class/qx/test/mobile/dialog/Menu.js +47 -26
  613. package/source/class/qx/test/mobile/dialog/Popup.js +30 -19
  614. package/source/class/qx/test/mobile/embed/Html.js +5 -8
  615. package/source/class/qx/test/mobile/form/Button.js +15 -13
  616. package/source/class/qx/test/mobile/form/CheckBox.js +21 -17
  617. package/source/class/qx/test/mobile/form/Form.js +37 -24
  618. package/source/class/qx/test/mobile/form/Group.js +5 -9
  619. package/source/class/qx/test/mobile/form/Label.js +11 -13
  620. package/source/class/qx/test/mobile/form/NumberField.js +49 -45
  621. package/source/class/qx/test/mobile/form/RadioButton.js +30 -19
  622. package/source/class/qx/test/mobile/form/SelectBox.js +39 -25
  623. package/source/class/qx/test/mobile/form/SingleRenderer.js +31 -27
  624. package/source/class/qx/test/mobile/form/Slider.js +55 -35
  625. package/source/class/qx/test/mobile/form/TextArea.js +34 -24
  626. package/source/class/qx/test/mobile/form/TextField.js +34 -24
  627. package/source/class/qx/test/mobile/form/ToggleButton.js +10 -14
  628. package/source/class/qx/test/mobile/layout/Card.js +21 -17
  629. package/source/class/qx/test/mobile/layout/HBox.js +25 -20
  630. package/source/class/qx/test/mobile/layout/VBox.js +25 -21
  631. package/source/class/qx/test/mobile/list/List.js +114 -83
  632. package/source/class/qx/test/mobile/navigationbar/NavigationBar.js +5 -9
  633. package/source/class/qx/test/mobile/page/Manager.js +7 -13
  634. package/source/class/qx/test/mobile/page/NavigationPage.js +7 -17
  635. package/source/class/qx/test/mobile/page/Page.js +101 -68
  636. package/source/class/qx/test/mobile/tabbar/TabBar.js +11 -21
  637. package/source/class/qx/test/mobile/toolbar/Toolbar.js +16 -16
  638. package/source/class/qx/test/performance/BaseCall.js +31 -36
  639. package/source/class/qx/test/performance/Event.js +60 -53
  640. package/source/class/qx/test/performance/Object.js +16 -22
  641. package/source/class/qx/test/performance/Property.js +20 -22
  642. package/source/class/qx/test/performance/data/Marshaling.js +25 -30
  643. package/source/class/qx/test/performance/decorator/AbstractDecorator.js +22 -34
  644. package/source/class/qx/test/performance/decorator/Background.js +4 -6
  645. package/source/class/qx/test/performance/decorator/BackgroundScale.js +6 -8
  646. package/source/class/qx/test/performance/decorator/Single.js +4 -6
  647. package/source/class/qx/test/performance/element/Element.js +50 -67
  648. package/source/class/qx/test/performance/widget/AbstractWidget.js +31 -44
  649. package/source/class/qx/test/performance/widget/Button.js +5 -7
  650. package/source/class/qx/test/performance/widget/Label.js +5 -7
  651. package/source/class/qx/test/performance/widget/RichLabel.js +6 -8
  652. package/source/class/qx/test/performance/widget/Widget.js +5 -7
  653. package/source/class/qx/test/performance/widget/WidgetWithDecorator.js +7 -9
  654. package/source/class/qx/test/performance/widget/WidgetWithSingle.js +9 -11
  655. package/source/class/qx/test/renderer/Color.js +22 -49
  656. package/source/class/qx/test/testclasses/BaseClassBoth.js +11 -8
  657. package/source/class/qx/test/testclasses/BaseClassIncluded.js +5 -6
  658. package/source/class/qx/test/testclasses/BaseClassPatched.js +15 -8
  659. package/source/class/qx/test/testclasses/DerivedClassBoth.js +7 -7
  660. package/source/class/qx/test/testclasses/DerivedClassIncluded.js +7 -7
  661. package/source/class/qx/test/testclasses/DerivedClassPatched.js +7 -7
  662. package/source/class/qx/test/testclasses/MMixinOne.js +4 -4
  663. package/source/class/qx/test/testclasses/MMixinTwo.js +2 -2
  664. package/source/class/qx/test/testclasses/RootClass.js +8 -8
  665. package/source/class/qx/test/theme/__init__.js +4 -4
  666. package/source/class/qx/test/theme/manager/Color.js +52 -66
  667. package/source/class/qx/test/theme/manager/Decoration.js +177 -154
  668. package/source/class/qx/test/theme/manager/Font.js +68 -39
  669. package/source/class/qx/test/theme/manager/Icon.js +46 -43
  670. package/source/class/qx/test/theme/manager/Meta.js +121 -110
  671. package/source/class/qx/test/theme/manager/__init__.js +4 -4
  672. package/source/class/qx/test/theme/manager/mock/Appearance.js +17 -23
  673. package/source/class/qx/test/theme/manager/mock/Color.js +7 -9
  674. package/source/class/qx/test/theme/manager/mock/Decoration.js +7 -10
  675. package/source/class/qx/test/theme/manager/mock/Font.js +6 -10
  676. package/source/class/qx/test/theme/simple/Appearance.js +268 -210
  677. package/source/class/qx/test/tool/utils/Utils.js +10 -8
  678. package/source/class/qx/test/toolchain/PrivateOptimization.js +20 -13
  679. package/source/class/qx/test/toolchain/TestRunner.js +12 -12
  680. package/source/class/qx/test/toolchain/VariantOptimization.js +37 -26
  681. package/source/class/qx/test/toolchain/__init__.js +4 -4
  682. package/source/class/qx/test/type/Array.js +8 -12
  683. package/source/class/qx/test/type/BaseArray.js +58 -78
  684. package/source/class/qx/test/type/BaseString.js +27 -65
  685. package/source/class/qx/test/type/__init__.js +4 -4
  686. package/source/class/qx/test/ui/BackgroundColor.js +20 -21
  687. package/source/class/qx/test/ui/ChildrenHandling.js +136 -81
  688. package/source/class/qx/test/ui/Destroy.js +310 -248
  689. package/source/class/qx/test/ui/Focus.js +40 -87
  690. package/source/class/qx/test/ui/Insets.js +14 -18
  691. package/source/class/qx/test/ui/LayoutTestCase.js +99 -92
  692. package/source/class/qx/test/ui/LocaleSwitch.js +37 -41
  693. package/source/class/qx/test/ui/RadioItems.js +11 -22
  694. package/source/class/qx/test/ui/Widget.js +13 -17
  695. package/source/class/qx/test/ui/Window.js +26 -39
  696. package/source/class/qx/test/ui/basic/Atom.js +37 -25
  697. package/source/class/qx/test/ui/basic/Image.js +179 -138
  698. package/source/class/qx/test/ui/basic/Label.js +147 -65
  699. package/source/class/qx/test/ui/basic/__init__.js +4 -4
  700. package/source/class/qx/test/ui/command/Command.js +105 -69
  701. package/source/class/qx/test/ui/command/Group.js +24 -21
  702. package/source/class/qx/test/ui/command/GroupManager.js +7 -12
  703. package/source/class/qx/test/ui/container/Stack.js +26 -36
  704. package/source/class/qx/test/ui/core/AbstractScrollArea.js +84 -67
  705. package/source/class/qx/test/ui/core/Appearance.js +53 -54
  706. package/source/class/qx/test/ui/core/Blocker.js +80 -44
  707. package/source/class/qx/test/ui/core/DragDropScrolling.js +69 -55
  708. package/source/class/qx/test/ui/core/Placement.js +22 -34
  709. package/source/class/qx/test/ui/core/Queues.js +28 -39
  710. package/source/class/qx/test/ui/core/SizeHint.js +32 -76
  711. package/source/class/qx/test/ui/core/SizeHintX.js +8 -15
  712. package/source/class/qx/test/ui/core/SizeHintY.js +8 -15
  713. package/source/class/qx/test/ui/core/Spacer.js +11 -18
  714. package/source/class/qx/test/ui/core/Widget.js +117 -112
  715. package/source/class/qx/test/ui/core/__init__.js +4 -4
  716. package/source/class/qx/test/ui/decoration/LinearGradient.js +18 -14
  717. package/source/class/qx/test/ui/embed/Iframe.js +69 -65
  718. package/source/class/qx/test/ui/embed/__init__.js +4 -4
  719. package/source/class/qx/test/ui/form/AbstractSelectBox.js +11 -16
  720. package/source/class/qx/test/ui/form/AbstractVirtualBox.js +12 -19
  721. package/source/class/qx/test/ui/form/BooleanFormat.js +40 -25
  722. package/source/class/qx/test/ui/form/Color.js +29 -19
  723. package/source/class/qx/test/ui/form/ComboBox.js +39 -25
  724. package/source/class/qx/test/ui/form/Date.js +34 -21
  725. package/source/class/qx/test/ui/form/DateField.js +16 -19
  726. package/source/class/qx/test/ui/form/Executable.js +98 -68
  727. package/source/class/qx/test/ui/form/Field.js +65 -54
  728. package/source/class/qx/test/ui/form/Form.js +211 -123
  729. package/source/class/qx/test/ui/form/FormManager.js +72 -100
  730. package/source/class/qx/test/ui/form/FormValidator.js +549 -399
  731. package/source/class/qx/test/ui/form/Label.js +87 -65
  732. package/source/class/qx/test/ui/form/List.js +19 -19
  733. package/source/class/qx/test/ui/form/MenuButton.js +26 -20
  734. package/source/class/qx/test/ui/form/ModelProperty.js +40 -36
  735. package/source/class/qx/test/ui/form/ModelSelection.js +39 -84
  736. package/source/class/qx/test/ui/form/NumberFormat.js +30 -19
  737. package/source/class/qx/test/ui/form/Placeholder.js +147 -87
  738. package/source/class/qx/test/ui/form/RadioButtonGroup.js +31 -26
  739. package/source/class/qx/test/ui/form/RadioGroup.js +58 -54
  740. package/source/class/qx/test/ui/form/Range.js +63 -28
  741. package/source/class/qx/test/ui/form/Renderer.js +39 -33
  742. package/source/class/qx/test/ui/form/Resetter.js +21 -35
  743. package/source/class/qx/test/ui/form/Slider.js +37 -21
  744. package/source/class/qx/test/ui/form/Spinner.js +9 -5
  745. package/source/class/qx/test/ui/form/SplitButton.js +7 -11
  746. package/source/class/qx/test/ui/form/StringFormat.js +60 -30
  747. package/source/class/qx/test/ui/form/TextArea.js +59 -41
  748. package/source/class/qx/test/ui/form/TextField.js +14 -16
  749. package/source/class/qx/test/ui/form/ToggleButton.js +20 -24
  750. package/source/class/qx/test/ui/form/VirtualSelectBox.js +66 -40
  751. package/source/class/qx/test/ui/form/__init__.js +4 -4
  752. package/source/class/qx/test/ui/form/virtual/VirtualComboBox.js +58 -60
  753. package/source/class/qx/test/ui/form/virtual/VirtualDropDownList.js +120 -110
  754. package/source/class/qx/test/ui/form/virtual/VirtualSelectBox.js +43 -27
  755. package/source/class/qx/test/ui/groupbox/CheckGroupBox.js +13 -18
  756. package/source/class/qx/test/ui/indicator/ProgressBar.js +73 -48
  757. package/source/class/qx/test/ui/layout/Box.js +23 -22
  758. package/source/class/qx/test/ui/layout/Flow.js +233 -153
  759. package/source/class/qx/test/ui/layout/Grid.js +88 -101
  760. package/source/class/qx/test/ui/layout/LayoutItem.js +57 -83
  761. package/source/class/qx/test/ui/layout/LayoutRoot.js +7 -11
  762. package/source/class/qx/test/ui/layout/Util.js +30 -31
  763. package/source/class/qx/test/ui/layout/__init__.js +4 -4
  764. package/source/class/qx/test/ui/list/AbstractListTest.js +13 -21
  765. package/source/class/qx/test/ui/list/Group.js +191 -114
  766. package/source/class/qx/test/ui/list/List.js +189 -132
  767. package/source/class/qx/test/ui/list/MAssert.js +14 -9
  768. package/source/class/qx/test/ui/list/ObjectGroup.js +131 -109
  769. package/source/class/qx/test/ui/list/core/MultiSelection.js +58 -44
  770. package/source/class/qx/test/ui/list/core/SingleSelection.js +43 -43
  771. package/source/class/qx/test/ui/list/fixture/GroupMock.js +6 -9
  772. package/source/class/qx/test/ui/list/fixture/ItemMock.js +9 -13
  773. package/source/class/qx/test/ui/root/Inline.js +22 -20
  774. package/source/class/qx/test/ui/selection/AbstractMultiSelectonTest.js +188 -105
  775. package/source/class/qx/test/ui/selection/AbstractSingleSelectonTest.js +173 -125
  776. package/source/class/qx/test/ui/selection/ListMultiSelection.js +19 -21
  777. package/source/class/qx/test/ui/selection/ListSingleSelection.js +19 -21
  778. package/source/class/qx/test/ui/selection/RadioGroup.js +41 -29
  779. package/source/class/qx/test/ui/selection/SelectBox.js +11 -17
  780. package/source/class/qx/test/ui/selection/Stack.js +22 -27
  781. package/source/class/qx/test/ui/selection/TabView.js +35 -26
  782. package/source/class/qx/test/ui/selection/TreeMultiSelection.js +14 -19
  783. package/source/class/qx/test/ui/selection/TreeSingleSelection.js +20 -24
  784. package/source/class/qx/test/ui/selection/__init__.js +4 -4
  785. package/source/class/qx/test/ui/table/Dispose.js +46 -46
  786. package/source/class/qx/test/ui/table/Table.js +74 -69
  787. package/source/class/qx/test/ui/table/__init__.js +4 -4
  788. package/source/class/qx/test/ui/table/celleditor/AbstractField.js +14 -28
  789. package/source/class/qx/test/ui/table/celleditor/ComboBox.js +11 -18
  790. package/source/class/qx/test/ui/table/celleditor/PasswordField.js +6 -10
  791. package/source/class/qx/test/ui/table/celleditor/SelectBox.js +16 -32
  792. package/source/class/qx/test/ui/table/celleditor/TextField.js +6 -9
  793. package/source/class/qx/test/ui/table/celleditor/__init__.js +4 -4
  794. package/source/class/qx/test/ui/table/columnmodel/Basic.js +130 -129
  795. package/source/class/qx/test/ui/table/model/Filtered.js +51 -36
  796. package/source/class/qx/test/ui/table/model/Simple.js +43 -45
  797. package/source/class/qx/test/ui/table/selection/Model.js +70 -22
  798. package/source/class/qx/test/ui/toolbar/OverflowHandling.js +145 -123
  799. package/source/class/qx/test/ui/toolbar/ToolBar.js +20 -30
  800. package/source/class/qx/test/ui/tree/Tree.js +63 -42
  801. package/source/class/qx/test/ui/tree/TreeFolder.js +44 -46
  802. package/source/class/qx/test/ui/tree/virtual/AbstractTreeTest.js +61 -96
  803. package/source/class/qx/test/ui/tree/virtual/MultiSelection.js +68 -39
  804. package/source/class/qx/test/ui/tree/virtual/OneSelection.js +82 -42
  805. package/source/class/qx/test/ui/tree/virtual/OpenCloseController.js +80 -101
  806. package/source/class/qx/test/ui/tree/virtual/SingleSelection.js +40 -32
  807. package/source/class/qx/test/ui/tree/virtual/Sorting.js +46 -47
  808. package/source/class/qx/test/ui/tree/virtual/Tree.js +267 -191
  809. package/source/class/qx/test/ui/tree/virtual/TreeItem.js +60 -63
  810. package/source/class/qx/test/ui/tree/virtual/UtilTest.js +65 -50
  811. package/source/class/qx/test/ui/tree/virtual/WidgetProvider.js +127 -132
  812. package/source/class/qx/test/ui/virtual/Axis.js +210 -193
  813. package/source/class/qx/test/ui/virtual/Pane.js +287 -190
  814. package/source/class/qx/test/ui/virtual/PaneUpdate.js +71 -77
  815. package/source/class/qx/test/ui/virtual/PointerEventMock.js +10 -13
  816. package/source/class/qx/test/ui/virtual/Scroller.js +29 -39
  817. package/source/class/qx/test/ui/virtual/__init__.js +4 -4
  818. package/source/class/qx/test/ui/virtual/cell/WidgetCell.js +39 -40
  819. package/source/class/qx/test/ui/virtual/layer/CellSpanManager.js +157 -127
  820. package/source/class/qx/test/ui/virtual/layer/Column.js +6 -10
  821. package/source/class/qx/test/ui/virtual/layer/GridLines.js +6 -10
  822. package/source/class/qx/test/ui/virtual/layer/GridLinesHorizontal.js +6 -9
  823. package/source/class/qx/test/ui/virtual/layer/GridLinesVertical.js +6 -9
  824. package/source/class/qx/test/ui/virtual/layer/HtmlCell.js +12 -19
  825. package/source/class/qx/test/ui/virtual/layer/HtmlCellSpan.js +13 -21
  826. package/source/class/qx/test/ui/virtual/layer/LayerMock.js +31 -43
  827. package/source/class/qx/test/ui/virtual/layer/LayerSimple.js +26 -26
  828. package/source/class/qx/test/ui/virtual/layer/LayerTestCase.js +52 -50
  829. package/source/class/qx/test/ui/virtual/layer/Row.js +6 -10
  830. package/source/class/qx/test/ui/virtual/layer/WidgetCell.js +45 -52
  831. package/source/class/qx/test/ui/virtual/layer/WidgetCellSpan.js +71 -48
  832. package/source/class/qx/test/ui/virtual/layer/__init__.js +4 -4
  833. package/source/class/qx/test/ui/virtual/performance/AbstractLayerTest.js +84 -68
  834. package/source/class/qx/test/ui/virtual/performance/DomCell.js +6 -9
  835. package/source/class/qx/test/ui/virtual/performance/DomPoolCell.js +6 -9
  836. package/source/class/qx/test/ui/virtual/performance/HtmlDivCell.js +7 -11
  837. package/source/class/qx/test/ui/virtual/performance/HtmlDivRelative.js +6 -9
  838. package/source/class/qx/test/ui/virtual/performance/HtmlTableCell.js +8 -13
  839. package/source/class/qx/test/ui/virtual/performance/HtmlTableCellNaive.js +8 -13
  840. package/source/class/qx/test/ui/virtual/performance/HtmlTableCssCell.js +8 -19
  841. package/source/class/qx/test/ui/virtual/performance/WidgetCell.js +10 -15
  842. package/source/class/qx/test/ui/virtual/performance/__init__.js +4 -4
  843. package/source/class/qx/test/ui/virtual/performance/layer/DomCell.js +24 -18
  844. package/source/class/qx/test/ui/virtual/performance/layer/DomPoolCell.js +28 -26
  845. package/source/class/qx/test/ui/virtual/performance/layer/HtmlDivRelative.js +13 -17
  846. package/source/class/qx/test/ui/virtual/performance/layer/HtmlTableCell.js +29 -28
  847. package/source/class/qx/test/ui/virtual/performance/layer/HtmlTableCellNaive.js +22 -24
  848. package/source/class/qx/test/ui/virtual/performance/layer/HtmlTableCssCell.js +32 -47
  849. package/source/class/qx/test/ui/virtual/performance/layer/__init__.js +4 -4
  850. package/source/class/qx/test/ui/window/Desktop.js +21 -12
  851. package/source/class/qx/test/util/Base64.js +10 -13
  852. package/source/class/qx/test/util/ColorUtil.js +121 -54
  853. package/source/class/qx/test/util/DateFormat.js +582 -351
  854. package/source/class/qx/test/util/DateMock.js +16 -19
  855. package/source/class/qx/test/util/DeferredCall.js +12 -13
  856. package/source/class/qx/test/util/Delegate.js +28 -26
  857. package/source/class/qx/test/util/DisposeUtil.js +32 -14
  858. package/source/class/qx/test/util/DynamicScriptLoader.js +99 -64
  859. package/source/class/qx/test/util/Fsm.js +16 -18
  860. package/source/class/qx/test/util/Function.js +23 -19
  861. package/source/class/qx/test/util/LibraryManager.js +15 -22
  862. package/source/class/qx/test/util/NumberFormat.js +53 -64
  863. package/source/class/qx/test/util/PropertyUtil.js +35 -35
  864. package/source/class/qx/test/util/Request.js +26 -18
  865. package/source/class/qx/test/util/ResourceManager.js +50 -35
  866. package/source/class/qx/test/util/ResponseParser.js +45 -35
  867. package/source/class/qx/test/util/RingBuffer.js +15 -28
  868. package/source/class/qx/test/util/Serializer.js +210 -153
  869. package/source/class/qx/test/util/StringBuilder.js +7 -13
  870. package/source/class/qx/test/util/StringSplit.js +114 -69
  871. package/source/class/qx/test/util/Uri.js +74 -78
  872. package/source/class/qx/test/util/Validate.js +95 -64
  873. package/source/class/qx/test/util/placement/BestFitAxis.js +17 -26
  874. package/source/class/qx/test/util/placement/DirectAxis.js +8 -11
  875. package/source/class/qx/test/util/placement/KeepAlignAxis.js +17 -26
  876. package/source/class/qx/test/util/placement/Placement.js +607 -244
  877. package/source/class/qx/test/util/placement/__init__.js +4 -4
  878. package/source/class/qx/theme/Classic.js +9 -11
  879. package/source/class/qx/theme/Indigo.js +9 -11
  880. package/source/class/qx/theme/Modern.js +9 -11
  881. package/source/class/qx/theme/Simple.js +9 -11
  882. package/source/class/qx/theme/TangibleDark.js +1 -1
  883. package/source/class/qx/theme/TangibleLight.js +1 -1
  884. package/source/class/qx/theme/__init__.js +4 -4
  885. package/source/class/qx/theme/classic/Appearance.js +995 -1336
  886. package/source/class/qx/theme/classic/Color.js +83 -83
  887. package/source/class/qx/theme/classic/Decoration.js +318 -299
  888. package/source/class/qx/theme/classic/Font.js +38 -25
  889. package/source/class/qx/theme/icon/Oxygen.js +4 -5
  890. package/source/class/qx/theme/icon/Tango.js +4 -5
  891. package/source/class/qx/theme/indigo/Appearance.js +66 -85
  892. package/source/class/qx/theme/indigo/Color.js +65 -66
  893. package/source/class/qx/theme/indigo/Decoration.js +31 -45
  894. package/source/class/qx/theme/indigo/Font.js +20 -29
  895. package/source/class/qx/theme/manager/Appearance.js +58 -91
  896. package/source/class/qx/theme/manager/Color.js +20 -41
  897. package/source/class/qx/theme/manager/Decoration.js +72 -100
  898. package/source/class/qx/theme/manager/Font.js +51 -67
  899. package/source/class/qx/theme/manager/Icon.js +13 -27
  900. package/source/class/qx/theme/manager/Meta.js +27 -44
  901. package/source/class/qx/theme/modern/Appearance.js +1049 -1440
  902. package/source/class/qx/theme/modern/Color.js +155 -166
  903. package/source/class/qx/theme/modern/Decoration.js +471 -598
  904. package/source/class/qx/theme/modern/Font.js +59 -52
  905. package/source/class/qx/theme/simple/Appearance.js +936 -1207
  906. package/source/class/qx/theme/simple/Color.js +62 -62
  907. package/source/class/qx/theme/simple/Decoration.js +456 -678
  908. package/source/class/qx/theme/simple/Font.js +18 -25
  909. package/source/class/qx/theme/simple/Image.js +49 -52
  910. package/source/class/qx/theme/tangible/Appearance.js +1575 -1743
  911. package/source/class/qx/theme/tangible/ColorDark.js +5 -5
  912. package/source/class/qx/theme/tangible/ColorEngine.js +38 -35
  913. package/source/class/qx/theme/tangible/ColorLight.js +7 -7
  914. package/source/class/qx/theme/tangible/Decoration.js +1108 -1300
  915. package/source/class/qx/theme/tangible/Font.js +66 -70
  916. package/source/class/qx/theme/tangible/Image.js +44 -48
  917. package/source/class/qx/tool/cli/Application.js +5 -5
  918. package/source/class/qx/tool/cli/Cli.js +103 -52
  919. package/source/class/qx/tool/cli/ConfigDb.js +18 -15
  920. package/source/class/qx/tool/cli/LibraryApplication.js +1 -1
  921. package/source/class/qx/tool/cli/Watch.js +174 -102
  922. package/source/class/qx/tool/cli/api/AbstractApi.js +17 -18
  923. package/source/class/qx/tool/cli/api/CompilerApi.js +15 -8
  924. package/source/class/qx/tool/cli/api/LibraryApi.js +4 -6
  925. package/source/class/qx/tool/cli/api/Test.js +12 -9
  926. package/source/class/qx/tool/cli/commands/Add.js +12 -15
  927. package/source/class/qx/tool/cli/commands/Clean.js +10 -9
  928. package/source/class/qx/tool/cli/commands/Command.js +18 -13
  929. package/source/class/qx/tool/cli/commands/Compile.js +630 -264
  930. package/source/class/qx/tool/cli/commands/Config.js +75 -42
  931. package/source/class/qx/tool/cli/commands/Create.js +108 -59
  932. package/source/class/qx/tool/cli/commands/Deploy.js +138 -86
  933. package/source/class/qx/tool/cli/commands/Es6ify.js +118 -0
  934. package/source/class/qx/tool/cli/commands/Lint.js +75 -34
  935. package/source/class/qx/tool/cli/commands/Migrate.js +13 -7
  936. package/source/class/qx/tool/cli/commands/Package.js +67 -45
  937. package/source/class/qx/tool/cli/commands/Pkg.js +21 -18
  938. package/source/class/qx/tool/cli/commands/Run.js +57 -37
  939. package/source/class/qx/tool/cli/commands/Serve.js +62 -37
  940. package/source/class/qx/tool/cli/commands/Test.js +40 -18
  941. package/source/class/qx/tool/cli/commands/add/Class.js +66 -28
  942. package/source/class/qx/tool/cli/commands/add/Script.js +54 -27
  943. package/source/class/qx/tool/cli/commands/package/Install.js +265 -103
  944. package/source/class/qx/tool/cli/commands/package/List.js +199 -75
  945. package/source/class/qx/tool/cli/commands/package/Migrate.js +7 -3
  946. package/source/class/qx/tool/cli/commands/package/Publish.js +209 -117
  947. package/source/class/qx/tool/cli/commands/package/Remove.js +40 -17
  948. package/source/class/qx/tool/cli/commands/package/Update.js +115 -48
  949. package/source/class/qx/tool/cli/commands/package/Upgrade.js +41 -20
  950. package/source/class/qx/tool/compiler/Analyser.js +427 -222
  951. package/source/class/qx/tool/compiler/ClassFile.js +831 -401
  952. package/source/class/qx/tool/compiler/Console.js +136 -87
  953. package/source/class/qx/tool/compiler/Es6ify.js +404 -0
  954. package/source/class/qx/tool/compiler/Preprocess.js +28 -25
  955. package/source/class/qx/tool/compiler/app/Application.js +149 -72
  956. package/source/class/qx/tool/compiler/app/Cldr.js +506 -106
  957. package/source/class/qx/tool/compiler/app/Library.js +62 -27
  958. package/source/class/qx/tool/compiler/app/Part.js +10 -12
  959. package/source/class/qx/tool/compiler/app/Translation.js +189 -162
  960. package/source/class/qx/tool/compiler/app/WebFont.js +215 -161
  961. package/source/class/qx/tool/compiler/jsdoc/ChildControlParser.js +3 -3
  962. package/source/class/qx/tool/compiler/jsdoc/CommandParser.js +8 -9
  963. package/source/class/qx/tool/compiler/jsdoc/ParamParser.js +7 -6
  964. package/source/class/qx/tool/compiler/jsdoc/Parser.js +27 -18
  965. package/source/class/qx/tool/compiler/jsdoc/ReturnParser.js +3 -3
  966. package/source/class/qx/tool/compiler/jsdoc/ThrowsParser.js +4 -4
  967. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +5 -6
  968. package/source/class/qx/tool/compiler/makers/AppMaker.js +38 -18
  969. package/source/class/qx/tool/compiler/makers/Maker.js +29 -21
  970. package/source/class/qx/tool/compiler/resources/AbstractMatcher.js +8 -8
  971. package/source/class/qx/tool/compiler/resources/Asset.js +123 -61
  972. package/source/class/qx/tool/compiler/resources/ImageLoader.js +18 -8
  973. package/source/class/qx/tool/compiler/resources/Manager.js +156 -93
  974. package/source/class/qx/tool/compiler/resources/MetaLoader.js +5 -3
  975. package/source/class/qx/tool/compiler/resources/ResourceConverter.js +8 -8
  976. package/source/class/qx/tool/compiler/resources/ResourceLoader.js +8 -9
  977. package/source/class/qx/tool/compiler/resources/ScssConverter.js +54 -18
  978. package/source/class/qx/tool/compiler/resources/ScssFile.js +157 -80
  979. package/source/class/qx/tool/compiler/resources/ScssIncludeConverter.js +3 -3
  980. package/source/class/qx/tool/compiler/targets/BuildTarget.js +23 -13
  981. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +29 -9
  982. package/source/class/qx/tool/compiler/targets/SourceTarget.js +2 -2
  983. package/source/class/qx/tool/compiler/targets/Target.js +292 -188
  984. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +163 -103
  985. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +48 -23
  986. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +75 -62
  987. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +49 -29
  988. package/source/class/qx/tool/compiler/targets/meta/Javascript.js +6 -7
  989. package/source/class/qx/tool/compiler/targets/meta/Package.js +54 -51
  990. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +41 -21
  991. package/source/class/qx/tool/compiler/targets/meta/Part.js +9 -10
  992. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +10 -5
  993. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +35 -23
  994. package/source/class/qx/tool/config/Abstract.js +61 -25
  995. package/source/class/qx/tool/config/Compile.js +3 -2
  996. package/source/class/qx/tool/config/Lockfile.js +3 -2
  997. package/source/class/qx/tool/config/Manifest.js +3 -2
  998. package/source/class/qx/tool/config/Registry.js +4 -3
  999. package/source/class/qx/tool/config/Utils.js +88 -37
  1000. package/source/class/qx/tool/migration/BaseMigration.js +67 -25
  1001. package/source/class/qx/tool/migration/M6_0_0.js +96 -46
  1002. package/source/class/qx/tool/migration/M7_0_0.js +12 -6
  1003. package/source/class/qx/tool/migration/Runner.js +28 -14
  1004. package/source/class/qx/tool/utils/IndexedArray.js +15 -18
  1005. package/source/class/qx/tool/utils/Json.js +35 -14
  1006. package/source/class/qx/tool/utils/LogManager.js +50 -26
  1007. package/source/class/qx/tool/utils/Logger.js +11 -12
  1008. package/source/class/qx/tool/utils/Promisify.js +45 -49
  1009. package/source/class/qx/tool/utils/Utils.js +63 -48
  1010. package/source/class/qx/tool/utils/Values.js +4 -7
  1011. package/source/class/qx/tool/utils/Website.js +82 -29
  1012. package/source/class/qx/tool/utils/files/FindFiles.js +37 -33
  1013. package/source/class/qx/tool/utils/files/Utils.js +74 -54
  1014. package/source/class/qx/tool/utils/json/Parser.js +163 -54
  1015. package/source/class/qx/tool/utils/json/Stringify.js +87 -72
  1016. package/source/class/qx/tool/utils/json/Tokenizer.js +64 -39
  1017. package/source/class/qx/tool/utils/json/Writer.js +20 -21
  1018. package/source/class/qx/type/Array.js +19 -41
  1019. package/source/class/qx/type/BaseArray.js +136 -151
  1020. package/source/class/qx/type/BaseError.js +17 -34
  1021. package/source/class/qx/type/BaseString.js +104 -121
  1022. package/source/class/qx/type/__init__.js +3 -3
  1023. package/source/class/qx/ui/basic/Atom.js +75 -109
  1024. package/source/class/qx/ui/basic/Image.js +283 -319
  1025. package/source/class/qx/ui/basic/Label.js +161 -208
  1026. package/source/class/qx/ui/command/Command.js +51 -86
  1027. package/source/class/qx/ui/command/Group.js +43 -50
  1028. package/source/class/qx/ui/command/GroupManager.js +50 -53
  1029. package/source/class/qx/ui/container/Composite.js +15 -29
  1030. package/source/class/qx/ui/container/Resizer.js +7 -11
  1031. package/source/class/qx/ui/container/Scroll.js +10 -21
  1032. package/source/class/qx/ui/container/SlideBar.js +76 -119
  1033. package/source/class/qx/ui/container/Stack.js +27 -54
  1034. package/source/class/qx/ui/control/ColorPopup.js +109 -130
  1035. package/source/class/qx/ui/control/ColorSelector.js +334 -301
  1036. package/source/class/qx/ui/control/DateChooser.js +143 -177
  1037. package/source/class/qx/ui/core/Blocker.js +91 -127
  1038. package/source/class/qx/ui/core/ColumnData.js +16 -34
  1039. package/source/class/qx/ui/core/DragDropCursor.js +17 -30
  1040. package/source/class/qx/ui/core/DragDropScrolling.js +8 -14
  1041. package/source/class/qx/ui/core/EventHandler.js +108 -132
  1042. package/source/class/qx/ui/core/FocusHandler.js +78 -127
  1043. package/source/class/qx/ui/core/IMultiSelection.js +5 -9
  1044. package/source/class/qx/ui/core/ISingleSelection.js +10 -16
  1045. package/source/class/qx/ui/core/ISingleSelectionProvider.js +4 -6
  1046. package/source/class/qx/ui/core/LayoutItem.js +190 -306
  1047. package/source/class/qx/ui/core/MBlocker.js +22 -38
  1048. package/source/class/qx/ui/core/MChildrenHandling.js +14 -29
  1049. package/source/class/qx/ui/core/MContentPadding.js +50 -69
  1050. package/source/class/qx/ui/core/MDragDropScrolling.js +82 -80
  1051. package/source/class/qx/ui/core/MExecutable.js +27 -52
  1052. package/source/class/qx/ui/core/MLayoutHandling.js +6 -14
  1053. package/source/class/qx/ui/core/MMovable.js +64 -80
  1054. package/source/class/qx/ui/core/MMultiSelectionHandling.js +68 -87
  1055. package/source/class/qx/ui/core/MNativeOverflow.js +16 -26
  1056. package/source/class/qx/ui/core/MPlacement.js +171 -170
  1057. package/source/class/qx/ui/core/MRemoteChildrenHandling.js +14 -27
  1058. package/source/class/qx/ui/core/MRemoteLayoutHandling.js +4 -7
  1059. package/source/class/qx/ui/core/MResizable.js +142 -175
  1060. package/source/class/qx/ui/core/MSingleSelectionHandling.js +40 -45
  1061. package/source/class/qx/ui/core/SingleSelectionManager.js +41 -60
  1062. package/source/class/qx/ui/core/Spacer.js +12 -22
  1063. package/source/class/qx/ui/core/Widget.js +628 -983
  1064. package/source/class/qx/ui/core/queue/Appearance.js +15 -24
  1065. package/source/class/qx/ui/core/queue/Dispose.js +7 -16
  1066. package/source/class/qx/ui/core/queue/Layout.js +44 -71
  1067. package/source/class/qx/ui/core/queue/Manager.js +140 -133
  1068. package/source/class/qx/ui/core/queue/Visibility.js +21 -39
  1069. package/source/class/qx/ui/core/queue/Widget.js +15 -26
  1070. package/source/class/qx/ui/core/scroll/AbstractScrollArea.js +124 -162
  1071. package/source/class/qx/ui/core/scroll/IScrollBar.js +13 -24
  1072. package/source/class/qx/ui/core/scroll/MRoll.js +14 -19
  1073. package/source/class/qx/ui/core/scroll/MScrollBarFactory.js +3 -6
  1074. package/source/class/qx/ui/core/scroll/MWheelHandling.js +10 -12
  1075. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +101 -125
  1076. package/source/class/qx/ui/core/scroll/ScrollBar.js +86 -130
  1077. package/source/class/qx/ui/core/scroll/ScrollPane.js +95 -134
  1078. package/source/class/qx/ui/core/scroll/ScrollSlider.js +13 -19
  1079. package/source/class/qx/ui/core/scroll/__init__.js +4 -4
  1080. package/source/class/qx/ui/core/selection/Abstract.js +255 -456
  1081. package/source/class/qx/ui/core/selection/ScrollArea.js +35 -73
  1082. package/source/class/qx/ui/core/selection/Widget.js +57 -120
  1083. package/source/class/qx/ui/decoration/Abstract.js +11 -20
  1084. package/source/class/qx/ui/decoration/Decorator.js +56 -55
  1085. package/source/class/qx/ui/decoration/IDecorator.js +5 -11
  1086. package/source/class/qx/ui/decoration/MBackgroundColor.js +13 -20
  1087. package/source/class/qx/ui/decoration/MBackgroundImage.js +82 -77
  1088. package/source/class/qx/ui/decoration/MBorderImage.js +72 -94
  1089. package/source/class/qx/ui/decoration/MBorderRadius.js +35 -38
  1090. package/source/class/qx/ui/decoration/MBoxShadow.js +61 -55
  1091. package/source/class/qx/ui/decoration/MDoubleBorder.js +157 -155
  1092. package/source/class/qx/ui/decoration/MLinearBackgroundGradient.js +169 -89
  1093. package/source/class/qx/ui/decoration/MSingleBorder.js +138 -124
  1094. package/source/class/qx/ui/decoration/MTransition.js +46 -42
  1095. package/source/class/qx/ui/decoration/__init__.js +2 -2
  1096. package/source/class/qx/ui/embed/AbstractIframe.js +37 -55
  1097. package/source/class/qx/ui/embed/Canvas.js +34 -66
  1098. package/source/class/qx/ui/embed/Html.js +46 -70
  1099. package/source/class/qx/ui/embed/Iframe.js +178 -158
  1100. package/source/class/qx/ui/embed/ThemedIframe.js +91 -135
  1101. package/source/class/qx/ui/form/AbstractField.js +262 -303
  1102. package/source/class/qx/ui/form/AbstractSelectBox.js +65 -87
  1103. package/source/class/qx/ui/form/Button.js +35 -73
  1104. package/source/class/qx/ui/form/CheckBox.js +26 -48
  1105. package/source/class/qx/ui/form/CheckedList.js +41 -25
  1106. package/source/class/qx/ui/form/CheckedSelectBox.js +97 -62
  1107. package/source/class/qx/ui/form/ComboBox.js +93 -121
  1108. package/source/class/qx/ui/form/DateField.js +140 -181
  1109. package/source/class/qx/ui/form/Form.js +50 -69
  1110. package/source/class/qx/ui/form/HoverButton.js +37 -54
  1111. package/source/class/qx/ui/form/IArrayForm.js +8 -16
  1112. package/source/class/qx/ui/form/IBooleanForm.js +8 -16
  1113. package/source/class/qx/ui/form/IColorForm.js +8 -16
  1114. package/source/class/qx/ui/form/IDateForm.js +8 -16
  1115. package/source/class/qx/ui/form/IExecutable.js +7 -14
  1116. package/source/class/qx/ui/form/IField.js +7 -14
  1117. package/source/class/qx/ui/form/IForm.js +17 -32
  1118. package/source/class/qx/ui/form/IListItem.js +1 -4
  1119. package/source/class/qx/ui/form/IModel.js +7 -15
  1120. package/source/class/qx/ui/form/IModelForm.js +8 -16
  1121. package/source/class/qx/ui/form/IModelSelection.js +4 -8
  1122. package/source/class/qx/ui/form/INumberForm.js +8 -15
  1123. package/source/class/qx/ui/form/IRadioItem.js +8 -17
  1124. package/source/class/qx/ui/form/IRange.js +10 -20
  1125. package/source/class/qx/ui/form/IStringForm.js +8 -16
  1126. package/source/class/qx/ui/form/List.js +82 -122
  1127. package/source/class/qx/ui/form/ListItem.js +21 -38
  1128. package/source/class/qx/ui/form/MForm.js +35 -41
  1129. package/source/class/qx/ui/form/MModelProperty.js +9 -14
  1130. package/source/class/qx/ui/form/MModelSelection.js +30 -32
  1131. package/source/class/qx/ui/form/MenuButton.js +44 -75
  1132. package/source/class/qx/ui/form/PasswordField.js +4 -6
  1133. package/source/class/qx/ui/form/RadioButton.js +36 -72
  1134. package/source/class/qx/ui/form/RadioButtonGroup.js +67 -82
  1135. package/source/class/qx/ui/form/RadioGroup.js +92 -127
  1136. package/source/class/qx/ui/form/RepeatButton.js +57 -106
  1137. package/source/class/qx/ui/form/Resetter.js +19 -29
  1138. package/source/class/qx/ui/form/SelectBox.js +56 -104
  1139. package/source/class/qx/ui/form/Slider.js +202 -269
  1140. package/source/class/qx/ui/form/Spinner.js +173 -217
  1141. package/source/class/qx/ui/form/SplitButton.js +73 -115
  1142. package/source/class/qx/ui/form/Tag.js +7 -8
  1143. package/source/class/qx/ui/form/TextArea.js +147 -153
  1144. package/source/class/qx/ui/form/TextField.js +37 -46
  1145. package/source/class/qx/ui/form/ToggleButton.js +54 -90
  1146. package/source/class/qx/ui/form/VirtualComboBox.js +73 -113
  1147. package/source/class/qx/ui/form/VirtualSelectBox.js +264 -274
  1148. package/source/class/qx/ui/form/core/AbstractVirtualBox.js +117 -157
  1149. package/source/class/qx/ui/form/core/VirtualDropDownList.js +101 -144
  1150. package/source/class/qx/ui/form/renderer/AbstractRenderer.js +48 -55
  1151. package/source/class/qx/ui/form/renderer/Double.js +25 -34
  1152. package/source/class/qx/ui/form/renderer/IFormRenderer.js +4 -8
  1153. package/source/class/qx/ui/form/renderer/Single.js +25 -35
  1154. package/source/class/qx/ui/form/renderer/SinglePlaceholder.js +12 -11
  1155. package/source/class/qx/ui/form/renderer/__init__.js +5 -5
  1156. package/source/class/qx/ui/form/validation/AsyncValidator.js +13 -19
  1157. package/source/class/qx/ui/form/validation/Manager.js +74 -108
  1158. package/source/class/qx/ui/form/validation/__init__.js +6 -6
  1159. package/source/class/qx/ui/groupbox/CheckGroupBox.js +30 -47
  1160. package/source/class/qx/ui/groupbox/GroupBox.js +36 -75
  1161. package/source/class/qx/ui/groupbox/RadioGroupBox.js +29 -59
  1162. package/source/class/qx/ui/groupbox/__init__.js +3 -3
  1163. package/source/class/qx/ui/indicator/ProgressBar.js +29 -46
  1164. package/source/class/qx/ui/layout/Abstract.js +28 -53
  1165. package/source/class/qx/ui/layout/Atom.js +95 -111
  1166. package/source/class/qx/ui/layout/Basic.js +29 -30
  1167. package/source/class/qx/ui/layout/Canvas.js +62 -99
  1168. package/source/class/qx/ui/layout/Dock.js +266 -250
  1169. package/source/class/qx/ui/layout/Flow.js +50 -76
  1170. package/source/class/qx/ui/layout/Grid.js +268 -343
  1171. package/source/class/qx/ui/layout/Grow.js +26 -32
  1172. package/source/class/qx/ui/layout/HBox.js +137 -153
  1173. package/source/class/qx/ui/layout/LineSizeIterator.js +19 -28
  1174. package/source/class/qx/ui/layout/Util.js +91 -120
  1175. package/source/class/qx/ui/layout/VBox.js +125 -147
  1176. package/source/class/qx/ui/list/List.js +148 -262
  1177. package/source/class/qx/ui/list/core/IListDelegate.js +13 -26
  1178. package/source/class/qx/ui/list/core/MWidgetController.js +51 -78
  1179. package/source/class/qx/ui/list/provider/IListProvider.js +15 -28
  1180. package/source/class/qx/ui/list/provider/WidgetProvider.js +52 -84
  1181. package/source/class/qx/ui/menu/AbstractButton.js +118 -127
  1182. package/source/class/qx/ui/menu/Button.js +11 -25
  1183. package/source/class/qx/ui/menu/ButtonLayout.js +49 -37
  1184. package/source/class/qx/ui/menu/CheckBox.js +21 -46
  1185. package/source/class/qx/ui/menu/Layout.js +45 -51
  1186. package/source/class/qx/ui/menu/Manager.js +131 -209
  1187. package/source/class/qx/ui/menu/Menu.js +164 -259
  1188. package/source/class/qx/ui/menu/MenuSlideBar.js +13 -20
  1189. package/source/class/qx/ui/menu/RadioButton.js +29 -51
  1190. package/source/class/qx/ui/menu/Separator.js +9 -16
  1191. package/source/class/qx/ui/menubar/Button.js +23 -41
  1192. package/source/class/qx/ui/menubar/MenuBar.js +9 -13
  1193. package/source/class/qx/ui/mobile/__init__.js +5 -5
  1194. package/source/class/qx/ui/mobile/basic/Atom.js +79 -101
  1195. package/source/class/qx/ui/mobile/basic/Image.js +80 -86
  1196. package/source/class/qx/ui/mobile/basic/Label.js +38 -54
  1197. package/source/class/qx/ui/mobile/container/Carousel.js +281 -188
  1198. package/source/class/qx/ui/mobile/container/Collapsible.js +57 -77
  1199. package/source/class/qx/ui/mobile/container/Composite.js +9 -13
  1200. package/source/class/qx/ui/mobile/container/Drawer.js +167 -164
  1201. package/source/class/qx/ui/mobile/container/INavigation.js +6 -10
  1202. package/source/class/qx/ui/mobile/container/IScrollDelegate.js +4 -6
  1203. package/source/class/qx/ui/mobile/container/MIScroll.js +108 -100
  1204. package/source/class/qx/ui/mobile/container/MNativeScroll.js +118 -102
  1205. package/source/class/qx/ui/mobile/container/MScrollHandling.js +8 -7
  1206. package/source/class/qx/ui/mobile/container/Navigation.js +46 -65
  1207. package/source/class/qx/ui/mobile/container/Scroll.js +140 -151
  1208. package/source/class/qx/ui/mobile/control/Picker.js +125 -112
  1209. package/source/class/qx/ui/mobile/core/Blocker.js +62 -71
  1210. package/source/class/qx/ui/mobile/core/DomUpdatedHandler.js +24 -60
  1211. package/source/class/qx/ui/mobile/core/EventHandler.js +158 -138
  1212. package/source/class/qx/ui/mobile/core/MChildrenHandling.js +14 -30
  1213. package/source/class/qx/ui/mobile/core/MLayoutHandling.js +6 -14
  1214. package/source/class/qx/ui/mobile/core/MResize.js +16 -30
  1215. package/source/class/qx/ui/mobile/core/Root.js +90 -80
  1216. package/source/class/qx/ui/mobile/core/Widget.js +351 -479
  1217. package/source/class/qx/ui/mobile/dialog/BusyIndicator.js +31 -46
  1218. package/source/class/qx/ui/mobile/dialog/Manager.js +127 -89
  1219. package/source/class/qx/ui/mobile/dialog/Menu.js +111 -122
  1220. package/source/class/qx/ui/mobile/dialog/Popup.js +202 -194
  1221. package/source/class/qx/ui/mobile/embed/Canvas.js +12 -25
  1222. package/source/class/qx/ui/mobile/embed/Html.js +13 -27
  1223. package/source/class/qx/ui/mobile/form/Button.js +12 -18
  1224. package/source/class/qx/ui/mobile/form/CheckBox.js +20 -35
  1225. package/source/class/qx/ui/mobile/form/Form.js +31 -51
  1226. package/source/class/qx/ui/mobile/form/Group.js +18 -30
  1227. package/source/class/qx/ui/mobile/form/Input.js +30 -35
  1228. package/source/class/qx/ui/mobile/form/Label.js +76 -79
  1229. package/source/class/qx/ui/mobile/form/MState.js +20 -27
  1230. package/source/class/qx/ui/mobile/form/MText.js +27 -47
  1231. package/source/class/qx/ui/mobile/form/MValue.js +66 -94
  1232. package/source/class/qx/ui/mobile/form/NumberField.js +30 -47
  1233. package/source/class/qx/ui/mobile/form/PasswordField.js +8 -14
  1234. package/source/class/qx/ui/mobile/form/RadioButton.js +25 -46
  1235. package/source/class/qx/ui/mobile/form/RadioGroup.js +2 -4
  1236. package/source/class/qx/ui/mobile/form/Row.js +14 -29
  1237. package/source/class/qx/ui/mobile/form/SelectBox.js +77 -104
  1238. package/source/class/qx/ui/mobile/form/Slider.js +116 -144
  1239. package/source/class/qx/ui/mobile/form/TextArea.js +26 -39
  1240. package/source/class/qx/ui/mobile/form/TextField.js +18 -28
  1241. package/source/class/qx/ui/mobile/form/Title.js +11 -19
  1242. package/source/class/qx/ui/mobile/form/ToggleButton.js +35 -58
  1243. package/source/class/qx/ui/mobile/form/__init__.js +1 -1
  1244. package/source/class/qx/ui/mobile/form/renderer/AbstractRenderer.js +24 -31
  1245. package/source/class/qx/ui/mobile/form/renderer/Single.js +59 -85
  1246. package/source/class/qx/ui/mobile/form/renderer/SinglePlaceholder.js +8 -16
  1247. package/source/class/qx/ui/mobile/layout/Abstract.js +48 -85
  1248. package/source/class/qx/ui/mobile/layout/AbstractBox.js +93 -125
  1249. package/source/class/qx/ui/mobile/layout/Card.js +133 -116
  1250. package/source/class/qx/ui/mobile/layout/CardAnimation.js +95 -72
  1251. package/source/class/qx/ui/mobile/layout/HBox.js +9 -12
  1252. package/source/class/qx/ui/mobile/layout/VBox.js +9 -12
  1253. package/source/class/qx/ui/mobile/list/IListDelegate.js +5 -9
  1254. package/source/class/qx/ui/mobile/list/List.js +172 -183
  1255. package/source/class/qx/ui/mobile/list/provider/Provider.js +58 -65
  1256. package/source/class/qx/ui/mobile/list/renderer/Abstract.js +54 -82
  1257. package/source/class/qx/ui/mobile/list/renderer/Default.js +39 -55
  1258. package/source/class/qx/ui/mobile/list/renderer/group/Abstract.js +20 -33
  1259. package/source/class/qx/ui/mobile/list/renderer/group/Default.js +29 -45
  1260. package/source/class/qx/ui/mobile/navigationbar/BackButton.js +11 -15
  1261. package/source/class/qx/ui/mobile/navigationbar/Button.js +11 -15
  1262. package/source/class/qx/ui/mobile/navigationbar/NavigationBar.js +23 -29
  1263. package/source/class/qx/ui/mobile/navigationbar/Title.js +12 -20
  1264. package/source/class/qx/ui/mobile/page/Manager.js +195 -169
  1265. package/source/class/qx/ui/mobile/page/NavigationPage.js +132 -196
  1266. package/source/class/qx/ui/mobile/page/Page.js +109 -148
  1267. package/source/class/qx/ui/mobile/tabbar/TabBar.js +41 -62
  1268. package/source/class/qx/ui/mobile/tabbar/TabButton.js +19 -28
  1269. package/source/class/qx/ui/mobile/toolbar/Button.js +7 -11
  1270. package/source/class/qx/ui/mobile/toolbar/Separator.js +11 -15
  1271. package/source/class/qx/ui/mobile/toolbar/ToolBar.js +30 -39
  1272. package/source/class/qx/ui/popup/Manager.js +41 -53
  1273. package/source/class/qx/ui/popup/Popup.js +22 -47
  1274. package/source/class/qx/ui/popup/__init__.js +32 -32
  1275. package/source/class/qx/ui/progressive/Progressive.js +96 -137
  1276. package/source/class/qx/ui/progressive/State.js +12 -19
  1277. package/source/class/qx/ui/progressive/headfoot/Abstract.js +10 -15
  1278. package/source/class/qx/ui/progressive/headfoot/Null.js +4 -7
  1279. package/source/class/qx/ui/progressive/headfoot/Progress.js +67 -69
  1280. package/source/class/qx/ui/progressive/headfoot/TableHeading.js +42 -54
  1281. package/source/class/qx/ui/progressive/model/Abstract.js +8 -15
  1282. package/source/class/qx/ui/progressive/model/Default.js +17 -29
  1283. package/source/class/qx/ui/progressive/renderer/Abstract.js +6 -11
  1284. package/source/class/qx/ui/progressive/renderer/FunctionCaller.js +4 -7
  1285. package/source/class/qx/ui/progressive/renderer/table/Row.js +215 -242
  1286. package/source/class/qx/ui/progressive/renderer/table/Widths.js +32 -47
  1287. package/source/class/qx/ui/progressive/renderer/table/cell/Abstract.js +17 -24
  1288. package/source/class/qx/ui/progressive/renderer/table/cell/Boolean.js +68 -79
  1289. package/source/class/qx/ui/progressive/renderer/table/cell/Conditional.js +146 -199
  1290. package/source/class/qx/ui/progressive/renderer/table/cell/Default.js +14 -32
  1291. package/source/class/qx/ui/progressive/renderer/table/cell/Html.js +2 -3
  1292. package/source/class/qx/ui/progressive/renderer/table/cell/Icon.js +38 -53
  1293. package/source/class/qx/ui/progressive/renderer/table/cell/Image.js +20 -42
  1294. package/source/class/qx/ui/progressive/renderer/table/cell/String.js +6 -12
  1295. package/source/class/qx/ui/progressive/structure/Abstract.js +14 -26
  1296. package/source/class/qx/ui/progressive/structure/Default.js +20 -40
  1297. package/source/class/qx/ui/root/Abstract.js +73 -90
  1298. package/source/class/qx/ui/root/Application.js +57 -61
  1299. package/source/class/qx/ui/root/Inline.js +78 -64
  1300. package/source/class/qx/ui/root/Page.js +25 -46
  1301. package/source/class/qx/ui/splitpane/Blocker.js +20 -30
  1302. package/source/class/qx/ui/splitpane/HLayout.js +53 -49
  1303. package/source/class/qx/ui/splitpane/Pane.js +112 -150
  1304. package/source/class/qx/ui/splitpane/Slider.js +9 -15
  1305. package/source/class/qx/ui/splitpane/Splitter.js +27 -46
  1306. package/source/class/qx/ui/splitpane/VLayout.js +53 -49
  1307. package/source/class/qx/ui/style/Stylesheet.js +12 -19
  1308. package/source/class/qx/ui/table/ICellEditorFactory.js +4 -8
  1309. package/source/class/qx/ui/table/ICellRenderer.js +3 -7
  1310. package/source/class/qx/ui/table/IColumnMenuButton.js +6 -11
  1311. package/source/class/qx/ui/table/IColumnMenuItem.js +5 -8
  1312. package/source/class/qx/ui/table/IHeaderRenderer.js +4 -8
  1313. package/source/class/qx/ui/table/IRowRenderer.js +6 -12
  1314. package/source/class/qx/ui/table/ITableModel.js +23 -41
  1315. package/source/class/qx/ui/table/MTableContextMenu.js +25 -28
  1316. package/source/class/qx/ui/table/Table.js +556 -748
  1317. package/source/class/qx/ui/table/celleditor/AbstractField.js +16 -26
  1318. package/source/class/qx/ui/table/celleditor/CheckBox.js +15 -16
  1319. package/source/class/qx/ui/table/celleditor/ComboBox.js +24 -34
  1320. package/source/class/qx/ui/table/celleditor/Dynamic.js +25 -32
  1321. package/source/class/qx/ui/table/celleditor/PasswordField.js +4 -8
  1322. package/source/class/qx/ui/table/celleditor/SelectBox.js +29 -38
  1323. package/source/class/qx/ui/table/celleditor/TextField.js +9 -14
  1324. package/source/class/qx/ui/table/cellrenderer/Abstract.js +78 -73
  1325. package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +65 -84
  1326. package/source/class/qx/ui/table/cellrenderer/Boolean.js +36 -50
  1327. package/source/class/qx/ui/table/cellrenderer/Conditional.js +74 -63
  1328. package/source/class/qx/ui/table/cellrenderer/Date.js +12 -22
  1329. package/source/class/qx/ui/table/cellrenderer/Debug.js +9 -9
  1330. package/source/class/qx/ui/table/cellrenderer/Default.js +30 -52
  1331. package/source/class/qx/ui/table/cellrenderer/Dynamic.js +13 -24
  1332. package/source/class/qx/ui/table/cellrenderer/Html.js +6 -8
  1333. package/source/class/qx/ui/table/cellrenderer/Image.js +13 -26
  1334. package/source/class/qx/ui/table/cellrenderer/Number.js +13 -24
  1335. package/source/class/qx/ui/table/cellrenderer/Password.js +8 -11
  1336. package/source/class/qx/ui/table/cellrenderer/Replace.js +27 -42
  1337. package/source/class/qx/ui/table/cellrenderer/String.js +5 -7
  1338. package/source/class/qx/ui/table/columnmenu/Button.js +19 -29
  1339. package/source/class/qx/ui/table/columnmenu/MenuItem.js +11 -19
  1340. package/source/class/qx/ui/table/columnmenu/__init__.js +4 -4
  1341. package/source/class/qx/ui/table/columnmenu/grid/__init__.js +4 -4
  1342. package/source/class/qx/ui/table/columnmenu/simple/__init__.js +4 -4
  1343. package/source/class/qx/ui/table/columnmodel/Basic.js +193 -215
  1344. package/source/class/qx/ui/table/columnmodel/Resize.js +65 -111
  1345. package/source/class/qx/ui/table/columnmodel/resizebehavior/Abstract.js +17 -24
  1346. package/source/class/qx/ui/table/columnmodel/resizebehavior/Default.js +66 -117
  1347. package/source/class/qx/ui/table/headerrenderer/Default.js +25 -46
  1348. package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +36 -51
  1349. package/source/class/qx/ui/table/headerrenderer/Icon.js +11 -27
  1350. package/source/class/qx/ui/table/model/Abstract.js +52 -62
  1351. package/source/class/qx/ui/table/model/Filtered.js +121 -153
  1352. package/source/class/qx/ui/table/model/Remote.js +166 -271
  1353. package/source/class/qx/ui/table/model/Simple.js +225 -252
  1354. package/source/class/qx/ui/table/pane/CellEvent.js +25 -32
  1355. package/source/class/qx/ui/table/pane/Clipper.js +8 -12
  1356. package/source/class/qx/ui/table/pane/FocusIndicator.js +42 -48
  1357. package/source/class/qx/ui/table/pane/Header.js +45 -86
  1358. package/source/class/qx/ui/table/pane/Model.js +73 -96
  1359. package/source/class/qx/ui/table/pane/Pane.js +132 -190
  1360. package/source/class/qx/ui/table/pane/Scroller.js +542 -659
  1361. package/source/class/qx/ui/table/rowrenderer/Default.js +75 -86
  1362. package/source/class/qx/ui/table/selection/Manager.js +23 -57
  1363. package/source/class/qx/ui/table/selection/Model.js +89 -179
  1364. package/source/class/qx/ui/tabview/Page.js +48 -79
  1365. package/source/class/qx/ui/tabview/TabButton.js +45 -72
  1366. package/source/class/qx/ui/tabview/TabView.js +94 -141
  1367. package/source/class/qx/ui/toolbar/Button.js +13 -18
  1368. package/source/class/qx/ui/toolbar/CheckBox.js +13 -17
  1369. package/source/class/qx/ui/toolbar/MenuButton.js +18 -34
  1370. package/source/class/qx/ui/toolbar/Part.js +42 -64
  1371. package/source/class/qx/ui/toolbar/PartContainer.js +19 -28
  1372. package/source/class/qx/ui/toolbar/RadioButton.js +12 -19
  1373. package/source/class/qx/ui/toolbar/Separator.js +15 -25
  1374. package/source/class/qx/ui/toolbar/SplitButton.js +19 -28
  1375. package/source/class/qx/ui/toolbar/ToolBar.js +182 -232
  1376. package/source/class/qx/ui/tooltip/Manager.js +125 -123
  1377. package/source/class/qx/ui/tooltip/ToolTip.js +49 -79
  1378. package/source/class/qx/ui/tooltip/__init__.js +23 -23
  1379. package/source/class/qx/ui/tree/Tree.js +95 -148
  1380. package/source/class/qx/ui/tree/TreeFile.js +8 -15
  1381. package/source/class/qx/ui/tree/TreeFolder.js +8 -15
  1382. package/source/class/qx/ui/tree/VirtualTree.js +207 -333
  1383. package/source/class/qx/ui/tree/VirtualTreeItem.js +30 -45
  1384. package/source/class/qx/ui/tree/__init__.js +50 -50
  1385. package/source/class/qx/ui/tree/core/AbstractItem.js +98 -152
  1386. package/source/class/qx/ui/tree/core/AbstractTreeItem.js +83 -137
  1387. package/source/class/qx/ui/tree/core/FolderOpenButton.js +15 -34
  1388. package/source/class/qx/ui/tree/core/IVirtualTree.js +13 -33
  1389. package/source/class/qx/ui/tree/core/IVirtualTreeDelegate.js +9 -16
  1390. package/source/class/qx/ui/tree/core/MWidgetController.js +58 -69
  1391. package/source/class/qx/ui/tree/core/OpenCloseController.js +29 -35
  1392. package/source/class/qx/ui/tree/core/Util.js +12 -16
  1393. package/source/class/qx/ui/tree/provider/IVirtualTreeProvider.js +10 -23
  1394. package/source/class/qx/ui/tree/provider/WidgetProvider.js +39 -67
  1395. package/source/class/qx/ui/tree/selection/SelectionManager.js +27 -41
  1396. package/source/class/qx/ui/treevirtual/DefaultDataCellRenderer.js +2 -3
  1397. package/source/class/qx/ui/treevirtual/MFamily.js +26 -63
  1398. package/source/class/qx/ui/treevirtual/MNode.js +43 -103
  1399. package/source/class/qx/ui/treevirtual/MTreePrimitive.js +41 -52
  1400. package/source/class/qx/ui/treevirtual/SelectionManager.js +44 -58
  1401. package/source/class/qx/ui/treevirtual/SimpleTreeDataCellRenderer.js +172 -229
  1402. package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +256 -367
  1403. package/source/class/qx/ui/treevirtual/SimpleTreeDataRowRenderer.js +8 -18
  1404. package/source/class/qx/ui/treevirtual/TreeVirtual.js +155 -250
  1405. package/source/class/qx/ui/treevirtual/celleditor/NodeEditor.js +10 -16
  1406. package/source/class/qx/ui/treevirtual/pane/Scroller.js +14 -11
  1407. package/source/class/qx/ui/virtual/__init__.js +4 -4
  1408. package/source/class/qx/ui/virtual/behavior/Prefetch.js +71 -86
  1409. package/source/class/qx/ui/virtual/cell/Abstract.js +18 -27
  1410. package/source/class/qx/ui/virtual/cell/AbstractImage.js +42 -51
  1411. package/source/class/qx/ui/virtual/cell/AbstractWidget.js +25 -49
  1412. package/source/class/qx/ui/virtual/cell/Boolean.js +31 -44
  1413. package/source/class/qx/ui/virtual/cell/Cell.js +143 -183
  1414. package/source/class/qx/ui/virtual/cell/CellStylesheet.js +31 -38
  1415. package/source/class/qx/ui/virtual/cell/Date.js +15 -24
  1416. package/source/class/qx/ui/virtual/cell/Html.js +9 -20
  1417. package/source/class/qx/ui/virtual/cell/ICell.js +4 -6
  1418. package/source/class/qx/ui/virtual/cell/IWidgetCell.js +7 -12
  1419. package/source/class/qx/ui/virtual/cell/IWidgetCellDelegate.js +4 -6
  1420. package/source/class/qx/ui/virtual/cell/Image.js +8 -14
  1421. package/source/class/qx/ui/virtual/cell/Number.js +14 -23
  1422. package/source/class/qx/ui/virtual/cell/String.js +11 -20
  1423. package/source/class/qx/ui/virtual/cell/WidgetCell.js +13 -16
  1424. package/source/class/qx/ui/virtual/cell/__init__.js +4 -4
  1425. package/source/class/qx/ui/virtual/core/Axis.js +75 -103
  1426. package/source/class/qx/ui/virtual/core/CellEvent.js +23 -31
  1427. package/source/class/qx/ui/virtual/core/IHtmlCellProvider.js +4 -6
  1428. package/source/class/qx/ui/virtual/core/ILayer.js +5 -15
  1429. package/source/class/qx/ui/virtual/core/IWidgetCellProvider.js +5 -7
  1430. package/source/class/qx/ui/virtual/core/Pane.js +199 -242
  1431. package/source/class/qx/ui/virtual/core/Scroller.js +25 -43
  1432. package/source/class/qx/ui/virtual/layer/Abstract.js +44 -83
  1433. package/source/class/qx/ui/virtual/layer/AbstractBackground.js +47 -68
  1434. package/source/class/qx/ui/virtual/layer/CellSpanManager.js +74 -96
  1435. package/source/class/qx/ui/virtual/layer/Column.js +26 -36
  1436. package/source/class/qx/ui/virtual/layer/GridLines.js +43 -70
  1437. package/source/class/qx/ui/virtual/layer/HtmlCell.js +34 -32
  1438. package/source/class/qx/ui/virtual/layer/HtmlCellSpan.js +54 -56
  1439. package/source/class/qx/ui/virtual/layer/Row.js +28 -36
  1440. package/source/class/qx/ui/virtual/layer/WidgetCell.js +87 -123
  1441. package/source/class/qx/ui/virtual/layer/WidgetCellSpan.js +123 -124
  1442. package/source/class/qx/ui/virtual/selection/Abstract.js +26 -54
  1443. package/source/class/qx/ui/virtual/selection/CellLines.js +11 -21
  1444. package/source/class/qx/ui/virtual/selection/CellRectangle.js +45 -73
  1445. package/source/class/qx/ui/virtual/selection/Column.js +16 -35
  1446. package/source/class/qx/ui/virtual/selection/ISelectionDelegate.js +5 -9
  1447. package/source/class/qx/ui/virtual/selection/MModel.js +84 -122
  1448. package/source/class/qx/ui/virtual/selection/Row.js +29 -61
  1449. package/source/class/qx/ui/website/Accordion.js +39 -42
  1450. package/source/class/qx/ui/website/Button.js +17 -25
  1451. package/source/class/qx/ui/website/Calendar.js +243 -172
  1452. package/source/class/qx/ui/website/Carousel.js +169 -155
  1453. package/source/class/qx/ui/website/DatePicker.js +99 -85
  1454. package/source/class/qx/ui/website/Rating.js +35 -53
  1455. package/source/class/qx/ui/website/Slider.js +174 -153
  1456. package/source/class/qx/ui/website/Table.js +482 -456
  1457. package/source/class/qx/ui/website/Tabs.js +225 -180
  1458. package/source/class/qx/ui/website/Widget.js +39 -52
  1459. package/source/class/qx/ui/window/Desktop.js +14 -12
  1460. package/source/class/qx/ui/window/IDesktop.js +8 -10
  1461. package/source/class/qx/ui/window/IWindowManager.js +7 -9
  1462. package/source/class/qx/ui/window/MDesktop.js +34 -62
  1463. package/source/class/qx/ui/window/Manager.js +31 -57
  1464. package/source/class/qx/ui/window/Window.js +250 -351
  1465. package/source/class/qx/util/AliasManager.js +23 -42
  1466. package/source/class/qx/util/Animation.js +248 -191
  1467. package/source/class/qx/util/Base64.js +144 -89
  1468. package/source/class/qx/util/ColorUtil.js +253 -287
  1469. package/source/class/qx/util/DeferredCall.js +21 -30
  1470. package/source/class/qx/util/DeferredCallManager.js +23 -44
  1471. package/source/class/qx/util/Delegate.js +4 -10
  1472. package/source/class/qx/util/DisposeUtil.js +76 -70
  1473. package/source/class/qx/util/DynamicScriptLoader.js +83 -66
  1474. package/source/class/qx/util/EditDistance.js +64 -58
  1475. package/source/class/qx/util/ExtendedColor.js +157 -163
  1476. package/source/class/qx/util/Function.js +8 -8
  1477. package/source/class/qx/util/LibraryManager.js +11 -18
  1478. package/source/class/qx/util/OOUtil.js +17 -36
  1479. package/source/class/qx/util/ObjectPool.js +19 -45
  1480. package/source/class/qx/util/Permutation.js +9 -16
  1481. package/source/class/qx/util/PropertyUtil.js +58 -70
  1482. package/source/class/qx/util/Request.js +27 -16
  1483. package/source/class/qx/util/ResourceManager.js +103 -104
  1484. package/source/class/qx/util/ResponseParser.js +14 -21
  1485. package/source/class/qx/util/RingBuffer.js +46 -48
  1486. package/source/class/qx/util/Serializer.js +103 -68
  1487. package/source/class/qx/util/StringBuilder.js +11 -22
  1488. package/source/class/qx/util/StringEscape.js +15 -29
  1489. package/source/class/qx/util/StringSplit.js +18 -21
  1490. package/source/class/qx/util/TimerManager.js +61 -70
  1491. package/source/class/qx/util/Uri.js +42 -30
  1492. package/source/class/qx/util/Uuid.js +50 -35
  1493. package/source/class/qx/util/Validate.js +88 -73
  1494. package/source/class/qx/util/ValueManager.js +17 -29
  1495. package/source/class/qx/util/Wheel.js +22 -16
  1496. package/source/class/qx/util/format/DateFormat.js +822 -759
  1497. package/source/class/qx/util/format/IFormat.js +4 -8
  1498. package/source/class/qx/util/format/NumberFormat.js +84 -91
  1499. package/source/class/qx/util/fsm/FiniteStateMachine.js +323 -382
  1500. package/source/class/qx/util/fsm/State.js +210 -249
  1501. package/source/class/qx/util/fsm/Transition.js +138 -160
  1502. package/source/class/qx/util/placement/AbstractAxis.js +12 -14
  1503. package/source/class/qx/util/placement/BestFitAxis.js +5 -8
  1504. package/source/class/qx/util/placement/DirectAxis.js +5 -7
  1505. package/source/class/qx/util/placement/KeepAlignAxis.js +8 -14
  1506. package/source/class/qx/util/placement/Placement.js +39 -56
  1507. package/source/class/qx/util/placement/__init__.js +4 -4
  1508. package/source/class/qx/xml/Document.js +21 -34
  1509. package/source/class/qx/xml/Element.js +90 -73
  1510. package/source/class/qx/xml/String.js +15 -21
  1511. package/source/class/qxWeb.js +102 -69
  1512. package/source/resource/qx/mobile/js/iscroll.js +1328 -982
  1513. package/source/resource/qx/mobile/js/iscroll.min.js +1081 -1
  1514. package/source/resource/qx/test/dynamicscriptloader/first.js +1 -1
  1515. package/source/resource/qx/test/dynamicscriptloader/second.js +1 -1
  1516. package/source/resource/qx/test/dynamicscriptloader/third.js +1 -1
  1517. package/source/resource/qx/test/script.js +1 -1
  1518. package/source/resource/qx/test/webworker.js +2 -2
  1519. package/source/resource/qx/tool/loadsass.js +16 -15
  1520. package/source/resource/qx/tool/schema/compile-1-0-0.json +13 -13
  1521. package/source/resource/qx/tool/website/build/assets/bluebird.min.js +4593 -9
  1522. package/source/resource/qx/tool/website/build/assets/buttons.js +391 -1
  1523. package/source/resource/qx/tool/website/build/assets/fontawesome-all.js +8963 -1
  1524. package/source/resource/qx/tool/website/build/assets/jquery.js +5452 -3
  1525. package/source/resource/qx/tool/website/build/diagnostics/dependson.js +31 -31
  1526. package/source/resource/qx/tool/website/build/diagnostics/requiredby.js +32 -36
  1527. package/source/resource/qx/tool/website/build/scripts/serve.js +87 -66
  1528. package/source/resource/qx/tool/website/src/assets/bluebird.min.js +4593 -9
  1529. package/source/resource/qx/tool/website/src/assets/buttons.js +391 -1
  1530. package/source/resource/qx/tool/website/src/assets/fontawesome-all.js +8963 -1
  1531. package/source/resource/qx/tool/website/src/assets/jquery.js +5452 -3
  1532. package/source/resource/qx/tool/website/src/diagnostics/dependson.js +31 -31
  1533. package/source/resource/qx/tool/website/src/diagnostics/requiredby.js +32 -36
  1534. package/source/resource/qx/tool/website/src/scripts/serve.js +87 -66
  1535. package/lib/resource/qx/static/blank.gif +0 -0
  1536. package/source/class/qx/io/remote/Exchange.js +0 -1063
  1537. package/source/class/qx/io/remote/Request.js +0 -1021
  1538. package/source/class/qx/io/remote/RequestQueue.js +0 -521
  1539. package/source/class/qx/io/remote/Response.js +0 -137
  1540. package/source/class/qx/io/remote/Rpc.js +0 -1075
  1541. package/source/class/qx/io/remote/RpcError.js +0 -198
  1542. package/source/class/qx/io/remote/__init__.js +0 -88
  1543. package/source/class/qx/io/remote/transport/Abstract.js +0 -513
  1544. package/source/class/qx/io/remote/transport/Iframe.js +0 -652
  1545. package/source/class/qx/io/remote/transport/Script.js +0 -475
  1546. package/source/class/qx/io/remote/transport/XmlHttp.js +0 -1019
  1547. package/source/class/qx/io/remote/transport/__init__.js +0 -3
  1548. package/source/class/qx/test/io/remote/AbstractRequest.js +0 -150
  1549. package/source/class/qx/test/io/remote/RequestIframe.js +0 -105
  1550. package/source/class/qx/test/io/remote/RequestXhr.js +0 -151
  1551. package/source/class/qx/test/io/remote/Rpc.js +0 -205
  1552. package/source/class/qx/test/io/remote/__init__.js +0 -4
  1553. package/source/class/qx/test/io/remote/transport/Iframe.js +0 -67
  1554. package/source/class/qx/test/io/remote/transport/XmlHttp.js +0 -133
  1555. package/source/class/qx/test/io/remote/transport/__init__.js +0 -4
@@ -2,1103 +2,1449 @@
2
2
  * iScroll v4.2.5 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org
3
3
  * Released under MIT license, http://cubiq.org/license
4
4
  */
5
- (function(window, doc){
6
- var m = Math,
7
- dummyStyle = doc.createElement('div').style,
8
- vendor = (function () {
9
- var vendors = 't,webkitT,MozT,msT,OT'.split(','),
10
- t,
11
- i = 0,
12
- l = vendors.length;
13
-
14
- for ( ; i < l; i++ ) {
15
- t = vendors[i] + 'ransform';
16
- if ( t in dummyStyle ) {
17
- return vendors[i].substr(0, vendors[i].length - 1);
5
+ (function (window, doc) {
6
+ var m = Math,
7
+ dummyStyle = doc.createElement("div").style,
8
+ vendor = (function () {
9
+ var vendors = "t,webkitT,MozT,msT,OT".split(","),
10
+ t,
11
+ i = 0,
12
+ l = vendors.length;
13
+
14
+ for (; i < l; i++) {
15
+ t = vendors[i] + "ransform";
16
+ if (t in dummyStyle) {
17
+ return vendors[i].substr(0, vendors[i].length - 1);
18
+ }
18
19
  }
19
- }
20
-
21
- return false;
22
- })(),
23
- cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '',
24
-
25
- // Style properties
26
- transform = prefixStyle('transform'),
27
- transitionProperty = prefixStyle('transitionProperty'),
28
- transitionDuration = prefixStyle('transitionDuration'),
29
- transformOrigin = prefixStyle('transformOrigin'),
30
- transitionTimingFunction = prefixStyle('transitionTimingFunction'),
31
- transitionDelay = prefixStyle('transitionDelay'),
32
20
 
21
+ return false;
22
+ })(),
23
+ cssVendor = vendor ? "-" + vendor.toLowerCase() + "-" : "",
24
+ // Style properties
25
+ transform = prefixStyle("transform"),
26
+ transitionProperty = prefixStyle("transitionProperty"),
27
+ transitionDuration = prefixStyle("transitionDuration"),
28
+ transformOrigin = prefixStyle("transformOrigin"),
29
+ transitionTimingFunction = prefixStyle("transitionTimingFunction"),
30
+ transitionDelay = prefixStyle("transitionDelay"),
33
31
  // Browser capabilities
34
- isAndroid = (/android/gi).test(navigator.appVersion),
35
- isIDevice = (/iphone|ipad/gi).test(navigator.appVersion),
36
- isTouchPad = (/hp-tablet/gi).test(navigator.appVersion),
37
-
38
- has3d = prefixStyle('perspective') in dummyStyle,
39
- hasTouch = 'ontouchstart' in window && !isTouchPad,
32
+ isAndroid = /android/gi.test(navigator.appVersion),
33
+ isIDevice = /iphone|ipad/gi.test(navigator.appVersion),
34
+ isTouchPad = /hp-tablet/gi.test(navigator.appVersion),
35
+ has3d = prefixStyle("perspective") in dummyStyle,
36
+ hasTouch = "ontouchstart" in window && !isTouchPad,
40
37
  hasTransform = vendor !== false,
41
- hasTransitionEnd = prefixStyle('transition') in dummyStyle,
42
-
43
- RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize',
44
- START_EV = hasTouch ? 'touchstart' : 'mousedown',
45
- MOVE_EV = hasTouch ? 'touchmove' : 'mousemove',
46
- END_EV = hasTouch ? 'touchend' : 'mouseup',
47
- CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup',
48
- TRNEND_EV = (function () {
49
- if ( vendor === false ) return false;
50
-
51
- var transitionEnd = {
52
- '' : 'transitionend',
53
- 'webkit' : 'webkitTransitionEnd',
54
- 'Moz' : 'transitionend',
55
- 'O' : 'otransitionend',
56
- 'ms' : 'MSTransitionEnd'
38
+ hasTransitionEnd = prefixStyle("transition") in dummyStyle,
39
+ RESIZE_EV =
40
+ "onorientationchange" in window ? "orientationchange" : "resize",
41
+ START_EV = hasTouch ? "touchstart" : "mousedown",
42
+ MOVE_EV = hasTouch ? "touchmove" : "mousemove",
43
+ END_EV = hasTouch ? "touchend" : "mouseup",
44
+ CANCEL_EV = hasTouch ? "touchcancel" : "mouseup",
45
+ TRNEND_EV = (function () {
46
+ if (vendor === false) return false;
47
+
48
+ var transitionEnd = {
49
+ "": "transitionend",
50
+ webkit: "webkitTransitionEnd",
51
+ Moz: "transitionend",
52
+ O: "otransitionend",
53
+ ms: "MSTransitionEnd"
57
54
  };
58
55
 
59
- return transitionEnd[vendor];
60
- })(),
61
-
62
- nextFrame = (function() {
63
- return window.requestAnimationFrame ||
64
- window.webkitRequestAnimationFrame ||
65
- window.mozRequestAnimationFrame ||
66
- window.oRequestAnimationFrame ||
67
- window.msRequestAnimationFrame ||
68
- function(callback) { return setTimeout(callback, 1); };
69
- })(),
70
- cancelFrame = (function () {
71
- return window.cancelRequestAnimationFrame ||
72
- window.webkitCancelAnimationFrame ||
73
- window.webkitCancelRequestAnimationFrame ||
74
- window.mozCancelRequestAnimationFrame ||
75
- window.oCancelRequestAnimationFrame ||
76
- window.msCancelRequestAnimationFrame ||
77
- clearTimeout;
78
- })(),
79
-
80
- // Helpers
81
- translateZ = has3d ? ' translateZ(0)' : '',
82
-
83
- // Constructor
84
- iScroll = function (el, options) {
85
- var that = this,
86
- i;
87
-
88
- that.wrapper = typeof el == 'object' ? el : doc.getElementById(el);
89
- that.wrapper.style.overflow = 'hidden';
90
- that.scroller = that.wrapper.children[0];
91
-
92
- // Default options
93
- that.options = {
94
- hScroll: true,
95
- vScroll: true,
96
- x: 0,
97
- y: 0,
98
- bounce: true,
99
- bounceLock: false,
100
- momentum: true,
101
- lockDirection: true,
102
- useTransform: true,
103
- useTransition: false,
104
- topOffset: 0,
105
- checkDOMChanges: false,
106
- handleClick: true,
107
-
108
- // Scrollbar
109
- hScrollbar: true,
110
- vScrollbar: true,
111
- fixedScrollbar: isAndroid,
112
- hideScrollbar: isIDevice,
113
- fadeScrollbar: isIDevice && has3d,
114
- scrollbarClass: '',
115
-
116
- // Zoom
117
- zoom: false,
118
- zoomMin: 1,
119
- zoomMax: 4,
120
- doubleTapZoom: 2,
121
- wheelAction: 'scroll',
122
-
123
- // Snap
124
- snap: false,
125
- snapThreshold: 1,
126
-
127
- // Events
128
- onRefresh: null,
129
- onBeforeScrollStart: function (e) { e.preventDefault(); },
130
- onScrollStart: null,
131
- onBeforeScrollMove: null,
132
- onScrollMove: null,
133
- onBeforeScrollEnd: null,
134
- onScrollEnd: null,
135
- onTouchEnd: null,
136
- onDestroy: null,
137
- onZoomStart: null,
138
- onZoom: null,
139
- onZoomEnd: null
140
- };
56
+ return transitionEnd[vendor];
57
+ })(),
58
+ nextFrame = (function () {
59
+ return (
60
+ window.requestAnimationFrame ||
61
+ window.webkitRequestAnimationFrame ||
62
+ window.mozRequestAnimationFrame ||
63
+ window.oRequestAnimationFrame ||
64
+ window.msRequestAnimationFrame ||
65
+ function (callback) {
66
+ return setTimeout(callback, 1);
67
+ }
68
+ );
69
+ })(),
70
+ cancelFrame = (function () {
71
+ return (
72
+ window.cancelRequestAnimationFrame ||
73
+ window.webkitCancelAnimationFrame ||
74
+ window.webkitCancelRequestAnimationFrame ||
75
+ window.mozCancelRequestAnimationFrame ||
76
+ window.oCancelRequestAnimationFrame ||
77
+ window.msCancelRequestAnimationFrame ||
78
+ clearTimeout
79
+ );
80
+ })(),
81
+ // Helpers
82
+ translateZ = has3d ? " translateZ(0)" : "",
83
+ // Constructor
84
+ iScroll = function (el, options) {
85
+ var that = this,
86
+ i;
87
+
88
+ that.wrapper = typeof el == "object" ? el : doc.getElementById(el);
89
+ that.wrapper.style.overflow = "hidden";
90
+ that.scroller = that.wrapper.children[0];
91
+
92
+ // Default options
93
+ that.options = {
94
+ hScroll: true,
95
+ vScroll: true,
96
+ x: 0,
97
+ y: 0,
98
+ bounce: true,
99
+ bounceLock: false,
100
+ momentum: true,
101
+ lockDirection: true,
102
+ useTransform: true,
103
+ useTransition: false,
104
+ topOffset: 0,
105
+ checkDOMChanges: false,
106
+ handleClick: true,
107
+
108
+ // Scrollbar
109
+ hScrollbar: true,
110
+ vScrollbar: true,
111
+ fixedScrollbar: isAndroid,
112
+ hideScrollbar: isIDevice,
113
+ fadeScrollbar: isIDevice && has3d,
114
+ scrollbarClass: "",
115
+
116
+ // Zoom
117
+ zoom: false,
118
+ zoomMin: 1,
119
+ zoomMax: 4,
120
+ doubleTapZoom: 2,
121
+ wheelAction: "scroll",
122
+
123
+ // Snap
124
+ snap: false,
125
+ snapThreshold: 1,
126
+
127
+ // Events
128
+ onRefresh: null,
129
+ onBeforeScrollStart(e) {
130
+ e.preventDefault();
131
+ },
132
+ onScrollStart: null,
133
+ onBeforeScrollMove: null,
134
+ onScrollMove: null,
135
+ onBeforeScrollEnd: null,
136
+ onScrollEnd: null,
137
+ onTouchEnd: null,
138
+ onDestroy: null,
139
+ onZoomStart: null,
140
+ onZoom: null,
141
+ onZoomEnd: null
142
+ };
141
143
 
142
- // User defined options
143
- for (i in options) that.options[i] = options[i];
144
-
145
- // Set starting position
146
- that.x = that.options.x;
147
- that.y = that.options.y;
148
-
149
- // Normalize options
150
- that.options.useTransform = hasTransform && that.options.useTransform;
151
- that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar;
152
- that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar;
153
- that.options.zoom = that.options.useTransform && that.options.zoom;
154
- that.options.useTransition = hasTransitionEnd && that.options.useTransition;
155
-
156
- // Helpers FIX ANDROID BUG!
157
- // translate3d and scale doesn't work together!
158
- // Ignoring 3d ONLY WHEN YOU SET that.options.zoom
159
- if ( that.options.zoom && isAndroid ){
160
- translateZ = '';
161
- }
162
-
163
- // Set some default styles
164
- that.scroller.style[transitionProperty] = that.options.useTransform ? cssVendor + 'transform' : 'top left';
165
- that.scroller.style[transitionDuration] = '0';
166
- that.scroller.style[transformOrigin] = '0 0';
167
- if (that.options.useTransition) that.scroller.style[transitionTimingFunction] = 'cubic-bezier(0.33,0.66,0.66,1)';
168
-
169
- if (that.options.useTransform) that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px)' + translateZ;
170
- else that.scroller.style.cssText += ';position:absolute;top:' + that.y + 'px;left:' + that.x + 'px';
171
-
172
- if (that.options.useTransition) that.options.fixedScrollbar = true;
173
-
174
- that.refresh();
175
-
176
- that._bind(RESIZE_EV, window);
177
- that._bind(START_EV);
178
- if (!hasTouch) {
179
- if (that.options.wheelAction != 'none') {
180
- that._bind('DOMMouseScroll');
181
- that._bind('mousewheel');
144
+ // User defined options
145
+ for (i in options) that.options[i] = options[i];
146
+
147
+ // Set starting position
148
+ that.x = that.options.x;
149
+ that.y = that.options.y;
150
+
151
+ // Normalize options
152
+ that.options.useTransform = hasTransform && that.options.useTransform;
153
+ that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar;
154
+ that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar;
155
+ that.options.zoom = that.options.useTransform && that.options.zoom;
156
+ that.options.useTransition =
157
+ hasTransitionEnd && that.options.useTransition;
158
+
159
+ // Helpers FIX ANDROID BUG!
160
+ // translate3d and scale doesn't work together!
161
+ // Ignoring 3d ONLY WHEN YOU SET that.options.zoom
162
+ if (that.options.zoom && isAndroid) {
163
+ translateZ = "";
182
164
  }
183
- }
184
165
 
185
- if (that.options.checkDOMChanges) that.checkDOMTime = setInterval(function () {
186
- that._checkDOMChanges();
187
- }, 500);
188
- };
166
+ // Set some default styles
167
+ that.scroller.style[transitionProperty] = that.options.useTransform
168
+ ? cssVendor + "transform"
169
+ : "top left";
170
+ that.scroller.style[transitionDuration] = "0";
171
+ that.scroller.style[transformOrigin] = "0 0";
172
+ if (that.options.useTransition)
173
+ that.scroller.style[transitionTimingFunction] =
174
+ "cubic-bezier(0.33,0.66,0.66,1)";
175
+
176
+ if (that.options.useTransform)
177
+ that.scroller.style[transform] =
178
+ "translate(" + that.x + "px," + that.y + "px)" + translateZ;
179
+ else
180
+ that.scroller.style.cssText +=
181
+ ";position:absolute;top:" + that.y + "px;left:" + that.x + "px";
182
+
183
+ if (that.options.useTransition) that.options.fixedScrollbar = true;
189
184
 
190
- // Prototype
191
- iScroll.prototype = {
192
- enabled: true,
193
- x: 0,
194
- y: 0,
195
- steps: [],
196
- scale: 1,
197
- currPageX: 0, currPageY: 0,
198
- pagesX: [], pagesY: [],
199
- aniTime: null,
200
- wheelZoomCount: 0,
201
-
202
- handleEvent: function (e) {
203
- var that = this;
204
- switch(e.type) {
205
- case START_EV:
206
- if (!hasTouch && e.button !== 0) return;
207
- that._start(e);
208
- break;
209
- case MOVE_EV: that._move(e); break;
210
- case END_EV:
211
- case CANCEL_EV: that._end(e); break;
212
- case RESIZE_EV: that._resize(); break;
213
- case 'DOMMouseScroll': case 'mousewheel': that._wheel(e); break;
214
- case TRNEND_EV: that._transitionEnd(e); break;
215
- }
216
- },
217
-
218
- _checkDOMChanges: function () {
219
- if (this.moved || this.zoomed || this.animating ||
220
- (this.scrollerW == this.scroller.offsetWidth * this.scale && this.scrollerH == this.scroller.offsetHeight * this.scale)) return;
221
-
222
- this.refresh();
223
- },
224
-
225
- _scrollbar: function (dir) {
226
- var that = this,
227
- bar;
228
-
229
- if (!that[dir + 'Scrollbar']) {
230
- if (that[dir + 'ScrollbarWrapper']) {
231
- if (hasTransform) that[dir + 'ScrollbarIndicator'].style[transform] = '';
232
- that[dir + 'ScrollbarWrapper'].parentNode.removeChild(that[dir + 'ScrollbarWrapper']);
233
- that[dir + 'ScrollbarWrapper'] = null;
234
- that[dir + 'ScrollbarIndicator'] = null;
185
+ that.refresh();
186
+
187
+ that._bind(RESIZE_EV, window);
188
+ that._bind(START_EV);
189
+ if (!hasTouch) {
190
+ if (that.options.wheelAction != "none") {
191
+ that._bind("DOMMouseScroll");
192
+ that._bind("mousewheel");
193
+ }
235
194
  }
236
195
 
237
- return;
238
- }
196
+ if (that.options.checkDOMChanges)
197
+ that.checkDOMTime = setInterval(function () {
198
+ that._checkDOMChanges();
199
+ }, 500);
200
+ };
201
+
202
+ // Prototype
203
+ iScroll.prototype = {
204
+ enabled: true,
205
+ x: 0,
206
+ y: 0,
207
+ steps: [],
208
+ scale: 1,
209
+ currPageX: 0,
210
+ currPageY: 0,
211
+ pagesX: [],
212
+ pagesY: [],
213
+ aniTime: null,
214
+ wheelZoomCount: 0,
215
+
216
+ handleEvent(e) {
217
+ var that = this;
218
+ switch (e.type) {
219
+ case START_EV:
220
+ if (!hasTouch && e.button !== 0) return;
221
+ that._start(e);
222
+ break;
223
+ case MOVE_EV:
224
+ that._move(e);
225
+ break;
226
+ case END_EV:
227
+ case CANCEL_EV:
228
+ that._end(e);
229
+ break;
230
+ case RESIZE_EV:
231
+ that._resize();
232
+ break;
233
+ case "DOMMouseScroll":
234
+ case "mousewheel":
235
+ that._wheel(e);
236
+ break;
237
+ case TRNEND_EV:
238
+ that._transitionEnd(e);
239
+ break;
240
+ }
241
+ },
242
+
243
+ _checkDOMChanges() {
244
+ if (
245
+ this.moved ||
246
+ this.zoomed ||
247
+ this.animating ||
248
+ (this.scrollerW == this.scroller.offsetWidth * this.scale &&
249
+ this.scrollerH == this.scroller.offsetHeight * this.scale)
250
+ )
251
+ return;
239
252
 
240
- if (!that[dir + 'ScrollbarWrapper']) {
241
- // Create the scrollbar wrapper
242
- bar = doc.createElement('div');
253
+ this.refresh();
254
+ },
243
255
 
244
- if (that.options.scrollbarClass) bar.className = that.options.scrollbarClass + dir.toUpperCase();
245
- else bar.style.cssText = 'position:absolute;z-index:100;' + (dir == 'h' ? 'height:7px;bottom:1px;left:2px;right:' + (that.vScrollbar ? '7' : '2') + 'px' : 'width:7px;bottom:' + (that.hScrollbar ? '7' : '2') + 'px;top:2px;right:1px');
256
+ _scrollbar(dir) {
257
+ var that = this,
258
+ bar;
246
259
 
247
- bar.style.cssText += ';pointer-events:none;' + cssVendor + 'transition-property:opacity;' + cssVendor + 'transition-duration:' + (that.options.fadeScrollbar ? '350ms' : '0') + ';overflow:hidden;opacity:' + (that.options.hideScrollbar ? '0' : '1');
260
+ if (!that[dir + "Scrollbar"]) {
261
+ if (that[dir + "ScrollbarWrapper"]) {
262
+ if (hasTransform)
263
+ that[dir + "ScrollbarIndicator"].style[transform] = "";
264
+ that[dir + "ScrollbarWrapper"].parentNode.removeChild(
265
+ that[dir + "ScrollbarWrapper"]
266
+ );
248
267
 
249
- that.wrapper.appendChild(bar);
250
- that[dir + 'ScrollbarWrapper'] = bar;
268
+ that[dir + "ScrollbarWrapper"] = null;
269
+ that[dir + "ScrollbarIndicator"] = null;
270
+ }
251
271
 
252
- // Create the scrollbar indicator
253
- bar = doc.createElement('div');
254
- if (!that.options.scrollbarClass) {
255
- bar.style.cssText = 'position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);' + cssVendor + 'background-clip:padding-box;' + cssVendor + 'box-sizing:border-box;' + (dir == 'h' ? 'height:100%' : 'width:100%') + ';' + cssVendor + 'border-radius:3px;border-radius:3px';
272
+ return;
256
273
  }
257
- bar.style.cssText += ';pointer-events:none;' + cssVendor + 'transition-property:' + cssVendor + 'transform;' + cssVendor + 'transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform: translate(0,0)' + translateZ;
258
- if (that.options.useTransition) bar.style.cssText += ';' + cssVendor + 'transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)';
259
274
 
260
- that[dir + 'ScrollbarWrapper'].appendChild(bar);
261
- that[dir + 'ScrollbarIndicator'] = bar;
262
- }
275
+ if (!that[dir + "ScrollbarWrapper"]) {
276
+ // Create the scrollbar wrapper
277
+ bar = doc.createElement("div");
278
+
279
+ if (that.options.scrollbarClass)
280
+ bar.className = that.options.scrollbarClass + dir.toUpperCase();
281
+ else
282
+ bar.style.cssText =
283
+ "position:absolute;z-index:100;" +
284
+ (dir == "h"
285
+ ? "height:7px;bottom:1px;left:2px;right:" +
286
+ (that.vScrollbar ? "7" : "2") +
287
+ "px"
288
+ : "width:7px;bottom:" +
289
+ (that.hScrollbar ? "7" : "2") +
290
+ "px;top:2px;right:1px");
291
+
292
+ bar.style.cssText +=
293
+ ";pointer-events:none;" +
294
+ cssVendor +
295
+ "transition-property:opacity;" +
296
+ cssVendor +
297
+ "transition-duration:" +
298
+ (that.options.fadeScrollbar ? "350ms" : "0") +
299
+ ";overflow:hidden;opacity:" +
300
+ (that.options.hideScrollbar ? "0" : "1");
301
+
302
+ that.wrapper.appendChild(bar);
303
+ that[dir + "ScrollbarWrapper"] = bar;
304
+
305
+ // Create the scrollbar indicator
306
+ bar = doc.createElement("div");
307
+ if (!that.options.scrollbarClass) {
308
+ bar.style.cssText =
309
+ "position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);" +
310
+ cssVendor +
311
+ "background-clip:padding-box;" +
312
+ cssVendor +
313
+ "box-sizing:border-box;" +
314
+ (dir == "h" ? "height:100%" : "width:100%") +
315
+ ";" +
316
+ cssVendor +
317
+ "border-radius:3px;border-radius:3px";
318
+ }
319
+ bar.style.cssText +=
320
+ ";pointer-events:none;" +
321
+ cssVendor +
322
+ "transition-property:" +
323
+ cssVendor +
324
+ "transform;" +
325
+ cssVendor +
326
+ "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);" +
327
+ cssVendor +
328
+ "transition-duration:0;" +
329
+ cssVendor +
330
+ "transform: translate(0,0)" +
331
+ translateZ;
332
+ if (that.options.useTransition)
333
+ bar.style.cssText +=
334
+ ";" +
335
+ cssVendor +
336
+ "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)";
337
+
338
+ that[dir + "ScrollbarWrapper"].appendChild(bar);
339
+ that[dir + "ScrollbarIndicator"] = bar;
340
+ }
263
341
 
264
- if (dir == 'h') {
265
- that.hScrollbarSize = that.hScrollbarWrapper.clientWidth;
266
- that.hScrollbarIndicatorSize = m.max(m.round(that.hScrollbarSize * that.hScrollbarSize / that.scrollerW), 8);
267
- that.hScrollbarIndicator.style.width = that.hScrollbarIndicatorSize + 'px';
268
- that.hScrollbarMaxScroll = that.hScrollbarSize - that.hScrollbarIndicatorSize;
269
- that.hScrollbarProp = that.hScrollbarMaxScroll / that.maxScrollX;
270
- } else {
271
- that.vScrollbarSize = that.vScrollbarWrapper.clientHeight;
272
- that.vScrollbarIndicatorSize = m.max(m.round(that.vScrollbarSize * that.vScrollbarSize / that.scrollerH), 8);
273
- that.vScrollbarIndicator.style.height = that.vScrollbarIndicatorSize + 'px';
274
- that.vScrollbarMaxScroll = that.vScrollbarSize - that.vScrollbarIndicatorSize;
275
- that.vScrollbarProp = that.vScrollbarMaxScroll / that.maxScrollY;
276
- }
342
+ if (dir == "h") {
343
+ that.hScrollbarSize = that.hScrollbarWrapper.clientWidth;
344
+ that.hScrollbarIndicatorSize = m.max(
345
+ m.round((that.hScrollbarSize * that.hScrollbarSize) / that.scrollerW),
346
+ 8
347
+ );
348
+
349
+ that.hScrollbarIndicator.style.width =
350
+ that.hScrollbarIndicatorSize + "px";
351
+ that.hScrollbarMaxScroll =
352
+ that.hScrollbarSize - that.hScrollbarIndicatorSize;
353
+ that.hScrollbarProp = that.hScrollbarMaxScroll / that.maxScrollX;
354
+ } else {
355
+ that.vScrollbarSize = that.vScrollbarWrapper.clientHeight;
356
+ that.vScrollbarIndicatorSize = m.max(
357
+ m.round((that.vScrollbarSize * that.vScrollbarSize) / that.scrollerH),
358
+ 8
359
+ );
360
+
361
+ that.vScrollbarIndicator.style.height =
362
+ that.vScrollbarIndicatorSize + "px";
363
+ that.vScrollbarMaxScroll =
364
+ that.vScrollbarSize - that.vScrollbarIndicatorSize;
365
+ that.vScrollbarProp = that.vScrollbarMaxScroll / that.maxScrollY;
366
+ }
277
367
 
278
- // Reset position
279
- that._scrollbarPos(dir, true);
280
- },
281
-
282
- _resize: function () {
283
- var that = this;
284
- setTimeout(function () { that.refresh(); }, isAndroid ? 200 : 0);
285
- },
286
-
287
- _pos: function (x, y) {
288
- if (this.zoomed) return;
289
-
290
- x = this.hScroll ? x : 0;
291
- y = this.vScroll ? y : 0;
292
-
293
- if (this.options.useTransform) {
294
- this.scroller.style[transform] = 'translate(' + x + 'px,' + y + 'px) scale(' + this.scale + ')' + translateZ;
295
- } else {
296
- x = m.round(x);
297
- y = m.round(y);
298
- this.scroller.style.left = x + 'px';
299
- this.scroller.style.top = y + 'px';
300
- }
368
+ // Reset position
369
+ that._scrollbarPos(dir, true);
370
+ },
371
+
372
+ _resize() {
373
+ var that = this;
374
+ setTimeout(
375
+ function () {
376
+ that.refresh();
377
+ },
378
+ isAndroid ? 200 : 0
379
+ );
380
+ },
381
+
382
+ _pos(x, y) {
383
+ if (this.zoomed) return;
384
+
385
+ x = this.hScroll ? x : 0;
386
+ y = this.vScroll ? y : 0;
387
+
388
+ if (this.options.useTransform) {
389
+ this.scroller.style[transform] =
390
+ "translate(" +
391
+ x +
392
+ "px," +
393
+ y +
394
+ "px) scale(" +
395
+ this.scale +
396
+ ")" +
397
+ translateZ;
398
+ } else {
399
+ x = m.round(x);
400
+ y = m.round(y);
401
+ this.scroller.style.left = x + "px";
402
+ this.scroller.style.top = y + "px";
403
+ }
301
404
 
302
- this.x = x;
303
- this.y = y;
405
+ this.x = x;
406
+ this.y = y;
304
407
 
305
- this._scrollbarPos('h');
306
- this._scrollbarPos('v');
307
- },
408
+ this._scrollbarPos("h");
409
+ this._scrollbarPos("v");
410
+ },
308
411
 
309
- _scrollbarPos: function (dir, hidden) {
310
- var that = this,
311
- pos = dir == 'h' ? that.x : that.y,
312
- size;
412
+ _scrollbarPos(dir, hidden) {
413
+ var that = this,
414
+ pos = dir == "h" ? that.x : that.y,
415
+ size;
313
416
 
314
- if (!that[dir + 'Scrollbar']) return;
417
+ if (!that[dir + "Scrollbar"]) return;
315
418
 
316
- pos = that[dir + 'ScrollbarProp'] * pos;
419
+ pos = that[dir + "ScrollbarProp"] * pos;
317
420
 
318
- if (pos < 0) {
319
- if (!that.options.fixedScrollbar) {
320
- size = that[dir + 'ScrollbarIndicatorSize'] + m.round(pos * 3);
321
- if (size < 8) size = 8;
322
- that[dir + 'ScrollbarIndicator'].style[dir == 'h' ? 'width' : 'height'] = size + 'px';
421
+ if (pos < 0) {
422
+ if (!that.options.fixedScrollbar) {
423
+ size = that[dir + "ScrollbarIndicatorSize"] + m.round(pos * 3);
424
+ if (size < 8) size = 8;
425
+ that[dir + "ScrollbarIndicator"].style[
426
+ dir == "h" ? "width" : "height"
427
+ ] = size + "px";
428
+ }
429
+ pos = 0;
430
+ } else if (pos > that[dir + "ScrollbarMaxScroll"]) {
431
+ if (!that.options.fixedScrollbar) {
432
+ size =
433
+ that[dir + "ScrollbarIndicatorSize"] -
434
+ m.round((pos - that[dir + "ScrollbarMaxScroll"]) * 3);
435
+ if (size < 8) size = 8;
436
+ that[dir + "ScrollbarIndicator"].style[
437
+ dir == "h" ? "width" : "height"
438
+ ] = size + "px";
439
+ pos =
440
+ that[dir + "ScrollbarMaxScroll"] +
441
+ (that[dir + "ScrollbarIndicatorSize"] - size);
442
+ } else {
443
+ pos = that[dir + "ScrollbarMaxScroll"];
444
+ }
323
445
  }
324
- pos = 0;
325
- } else if (pos > that[dir + 'ScrollbarMaxScroll']) {
326
- if (!that.options.fixedScrollbar) {
327
- size = that[dir + 'ScrollbarIndicatorSize'] - m.round((pos - that[dir + 'ScrollbarMaxScroll']) * 3);
328
- if (size < 8) size = 8;
329
- that[dir + 'ScrollbarIndicator'].style[dir == 'h' ? 'width' : 'height'] = size + 'px';
330
- pos = that[dir + 'ScrollbarMaxScroll'] + (that[dir + 'ScrollbarIndicatorSize'] - size);
331
- } else {
332
- pos = that[dir + 'ScrollbarMaxScroll'];
446
+
447
+ that[dir + "ScrollbarWrapper"].style[transitionDelay] = "0";
448
+ that[dir + "ScrollbarWrapper"].style.opacity =
449
+ hidden && that.options.hideScrollbar ? "0" : "1";
450
+ that[dir + "ScrollbarIndicator"].style[transform] =
451
+ "translate(" +
452
+ (dir == "h" ? pos + "px,0)" : "0," + pos + "px)") +
453
+ translateZ;
454
+ },
455
+
456
+ _start(e) {
457
+ var that = this,
458
+ point = hasTouch ? e.touches[0] : e,
459
+ matrix,
460
+ x,
461
+ y,
462
+ c1,
463
+ c2;
464
+
465
+ if (!that.enabled) return;
466
+
467
+ if (that.options.onBeforeScrollStart)
468
+ that.options.onBeforeScrollStart.call(that, e);
469
+
470
+ if (that.options.useTransition || that.options.zoom)
471
+ that._transitionTime(0);
472
+
473
+ that.moved = false;
474
+ that.animating = false;
475
+ that.zoomed = false;
476
+ that.distX = 0;
477
+ that.distY = 0;
478
+ that.absDistX = 0;
479
+ that.absDistY = 0;
480
+ that.dirX = 0;
481
+ that.dirY = 0;
482
+
483
+ // Gesture start
484
+ if (that.options.zoom && hasTouch && e.touches.length > 1) {
485
+ c1 = m.abs(e.touches[0].pageX - e.touches[1].pageX);
486
+ c2 = m.abs(e.touches[0].pageY - e.touches[1].pageY);
487
+ that.touchesDistStart = m.sqrt(c1 * c1 + c2 * c2);
488
+
489
+ that.originX =
490
+ m.abs(
491
+ e.touches[0].pageX + e.touches[1].pageX - that.wrapperOffsetLeft * 2
492
+ ) /
493
+ 2 -
494
+ that.x;
495
+ that.originY =
496
+ m.abs(
497
+ e.touches[0].pageY + e.touches[1].pageY - that.wrapperOffsetTop * 2
498
+ ) /
499
+ 2 -
500
+ that.y;
501
+
502
+ if (that.options.onZoomStart) that.options.onZoomStart.call(that, e);
333
503
  }
334
- }
335
504
 
336
- that[dir + 'ScrollbarWrapper'].style[transitionDelay] = '0';
337
- that[dir + 'ScrollbarWrapper'].style.opacity = hidden && that.options.hideScrollbar ? '0' : '1';
338
- that[dir + 'ScrollbarIndicator'].style[transform] = 'translate(' + (dir == 'h' ? pos + 'px,0)' : '0,' + pos + 'px)') + translateZ;
339
- },
340
-
341
- _start: function (e) {
342
- var that = this,
343
- point = hasTouch ? e.touches[0] : e,
344
- matrix, x, y,
345
- c1, c2;
346
-
347
- if (!that.enabled) return;
348
-
349
- if (that.options.onBeforeScrollStart) that.options.onBeforeScrollStart.call(that, e);
350
-
351
- if (that.options.useTransition || that.options.zoom) that._transitionTime(0);
352
-
353
- that.moved = false;
354
- that.animating = false;
355
- that.zoomed = false;
356
- that.distX = 0;
357
- that.distY = 0;
358
- that.absDistX = 0;
359
- that.absDistY = 0;
360
- that.dirX = 0;
361
- that.dirY = 0;
362
-
363
- // Gesture start
364
- if (that.options.zoom && hasTouch && e.touches.length > 1) {
365
- c1 = m.abs(e.touches[0].pageX-e.touches[1].pageX);
366
- c2 = m.abs(e.touches[0].pageY-e.touches[1].pageY);
367
- that.touchesDistStart = m.sqrt(c1 * c1 + c2 * c2);
368
-
369
- that.originX = m.abs(e.touches[0].pageX + e.touches[1].pageX - that.wrapperOffsetLeft * 2) / 2 - that.x;
370
- that.originY = m.abs(e.touches[0].pageY + e.touches[1].pageY - that.wrapperOffsetTop * 2) / 2 - that.y;
371
-
372
- if (that.options.onZoomStart) that.options.onZoomStart.call(that, e);
373
- }
505
+ if (that.options.momentum) {
506
+ if (that.options.useTransform) {
507
+ // Very lame general purpose alternative to CSSMatrix
508
+ matrix = getComputedStyle(that.scroller, null)
509
+ [transform].replace(/[^0-9\-.,]/g, "")
510
+ .split(",");
511
+ x = +(matrix[12] || matrix[4]);
512
+ y = +(matrix[13] || matrix[5]);
513
+ } else {
514
+ x = +getComputedStyle(that.scroller, null).left.replace(
515
+ /[^0-9-]/g,
516
+ ""
517
+ );
518
+
519
+ y = +getComputedStyle(that.scroller, null).top.replace(
520
+ /[^0-9-]/g,
521
+ ""
522
+ );
523
+ }
374
524
 
375
- if (that.options.momentum) {
376
- if (that.options.useTransform) {
377
- // Very lame general purpose alternative to CSSMatrix
378
- matrix = getComputedStyle(that.scroller, null)[transform].replace(/[^0-9\-.,]/g, '').split(',');
379
- x = +(matrix[12] || matrix[4]);
380
- y = +(matrix[13] || matrix[5]);
381
- } else {
382
- x = +getComputedStyle(that.scroller, null).left.replace(/[^0-9-]/g, '');
383
- y = +getComputedStyle(that.scroller, null).top.replace(/[^0-9-]/g, '');
384
- }
385
-
386
- if (x != that.x || y != that.y) {
387
- if (that.options.useTransition) that._unbind(TRNEND_EV);
388
- else cancelFrame(that.aniTime);
389
- that.steps = [];
390
- that._pos(x, y);
391
- if (that.options.onScrollEnd) that.options.onScrollEnd.call(that);
525
+ if (x != that.x || y != that.y) {
526
+ if (that.options.useTransition) that._unbind(TRNEND_EV);
527
+ else cancelFrame(that.aniTime);
528
+ that.steps = [];
529
+ that._pos(x, y);
530
+ if (that.options.onScrollEnd) that.options.onScrollEnd.call(that);
531
+ }
392
532
  }
393
- }
394
-
395
- that.absStartX = that.x; // Needed by snap threshold
396
- that.absStartY = that.y;
397
-
398
- that.startX = that.x;
399
- that.startY = that.y;
400
- that.pointX = point.pageX;
401
- that.pointY = point.pageY;
402
-
403
- that.startTime = e.timeStamp || Date.now();
404
-
405
- if (that.options.onScrollStart) that.options.onScrollStart.call(that, e);
406
-
407
- that._bind(MOVE_EV, window);
408
- that._bind(END_EV, window);
409
- that._bind(CANCEL_EV, window);
410
- },
411
-
412
- _move: function (e) {
413
- var that = this,
414
- point = hasTouch ? e.touches[0] : e,
415
- deltaX = point.pageX - that.pointX,
416
- deltaY = point.pageY - that.pointY,
417
- newX = that.x + deltaX,
418
- newY = that.y + deltaY,
419
- c1, c2, scale,
420
- timestamp = e.timeStamp || Date.now();
421
-
422
- if (that.options.onBeforeScrollMove) that.options.onBeforeScrollMove.call(that, e);
423
-
424
- // Zoom
425
- if (that.options.zoom && hasTouch && e.touches.length > 1) {
426
- c1 = m.abs(e.touches[0].pageX - e.touches[1].pageX);
427
- c2 = m.abs(e.touches[0].pageY - e.touches[1].pageY);
428
- that.touchesDist = m.sqrt(c1*c1+c2*c2);
429
533
 
430
- that.zoomed = true;
534
+ that.absStartX = that.x; // Needed by snap threshold
535
+ that.absStartY = that.y;
431
536
 
432
- scale = 1 / that.touchesDistStart * that.touchesDist * this.scale;
537
+ that.startX = that.x;
538
+ that.startY = that.y;
539
+ that.pointX = point.pageX;
540
+ that.pointY = point.pageY;
433
541
 
434
- if (scale < that.options.zoomMin) scale = 0.5 * that.options.zoomMin * Math.pow(2.0, scale / that.options.zoomMin);
435
- else if (scale > that.options.zoomMax) scale = 2.0 * that.options.zoomMax * Math.pow(0.5, that.options.zoomMax / scale);
542
+ that.startTime = e.timeStamp || Date.now();
436
543
 
437
- that.lastScale = scale / this.scale;
544
+ if (that.options.onScrollStart) that.options.onScrollStart.call(that, e);
438
545
 
439
- newX = this.originX - this.originX * that.lastScale + this.x;
440
- newY = this.originY - this.originY * that.lastScale + this.y;
546
+ that._bind(MOVE_EV, window);
547
+ that._bind(END_EV, window);
548
+ that._bind(CANCEL_EV, window);
549
+ },
441
550
 
442
- this.scroller.style[transform] = 'translate(' + newX + 'px,' + newY + 'px) scale(' + scale + ')' + translateZ;
551
+ _move(e) {
552
+ var that = this,
553
+ point = hasTouch ? e.touches[0] : e,
554
+ deltaX = point.pageX - that.pointX,
555
+ deltaY = point.pageY - that.pointY,
556
+ newX = that.x + deltaX,
557
+ newY = that.y + deltaY,
558
+ c1,
559
+ c2,
560
+ scale,
561
+ timestamp = e.timeStamp || Date.now();
443
562
 
444
- if (that.options.onZoom) that.options.onZoom.call(that, e);
445
- return;
446
- }
563
+ if (that.options.onBeforeScrollMove)
564
+ that.options.onBeforeScrollMove.call(that, e);
447
565
 
448
- that.pointX = point.pageX;
449
- that.pointY = point.pageY;
566
+ // Zoom
567
+ if (that.options.zoom && hasTouch && e.touches.length > 1) {
568
+ c1 = m.abs(e.touches[0].pageX - e.touches[1].pageX);
569
+ c2 = m.abs(e.touches[0].pageY - e.touches[1].pageY);
570
+ that.touchesDist = m.sqrt(c1 * c1 + c2 * c2);
571
+
572
+ that.zoomed = true;
573
+
574
+ scale = (1 / that.touchesDistStart) * that.touchesDist * this.scale;
575
+
576
+ if (scale < that.options.zoomMin)
577
+ scale =
578
+ 0.5 *
579
+ that.options.zoomMin *
580
+ Math.pow(2.0, scale / that.options.zoomMin);
581
+ else if (scale > that.options.zoomMax)
582
+ scale =
583
+ 2.0 *
584
+ that.options.zoomMax *
585
+ Math.pow(0.5, that.options.zoomMax / scale);
586
+
587
+ that.lastScale = scale / this.scale;
588
+
589
+ newX = this.originX - this.originX * that.lastScale + this.x;
590
+ newY = this.originY - this.originY * that.lastScale + this.y;
591
+
592
+ this.scroller.style[transform] =
593
+ "translate(" +
594
+ newX +
595
+ "px," +
596
+ newY +
597
+ "px) scale(" +
598
+ scale +
599
+ ")" +
600
+ translateZ;
601
+
602
+ if (that.options.onZoom) that.options.onZoom.call(that, e);
603
+ return;
604
+ }
450
605
 
451
- // Slow down if outside of the boundaries
452
- if (newX > 0 || newX < that.maxScrollX) {
453
- newX = that.options.bounce ? that.x + (deltaX / 2) : newX >= 0 || that.maxScrollX >= 0 ? 0 : that.maxScrollX;
454
- }
455
- if (newY > that.minScrollY || newY < that.maxScrollY) {
456
- newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= that.minScrollY || that.maxScrollY >= 0 ? that.minScrollY : that.maxScrollY;
457
- }
606
+ that.pointX = point.pageX;
607
+ that.pointY = point.pageY;
458
608
 
459
- that.distX += deltaX;
460
- that.distY += deltaY;
461
- that.absDistX = m.abs(that.distX);
462
- that.absDistY = m.abs(that.distY);
609
+ // Slow down if outside of the boundaries
610
+ if (newX > 0 || newX < that.maxScrollX) {
611
+ newX = that.options.bounce
612
+ ? that.x + deltaX / 2
613
+ : newX >= 0 || that.maxScrollX >= 0
614
+ ? 0
615
+ : that.maxScrollX;
616
+ }
617
+ if (newY > that.minScrollY || newY < that.maxScrollY) {
618
+ newY = that.options.bounce
619
+ ? that.y + deltaY / 2
620
+ : newY >= that.minScrollY || that.maxScrollY >= 0
621
+ ? that.minScrollY
622
+ : that.maxScrollY;
623
+ }
463
624
 
464
- if (that.absDistX < 6 && that.absDistY < 6) {
465
- return;
466
- }
625
+ that.distX += deltaX;
626
+ that.distY += deltaY;
627
+ that.absDistX = m.abs(that.distX);
628
+ that.absDistY = m.abs(that.distY);
467
629
 
468
- // Lock direction
469
- if (that.options.lockDirection) {
470
- if (that.absDistX > that.absDistY + 5) {
471
- newY = that.y;
472
- deltaY = 0;
473
- } else if (that.absDistY > that.absDistX + 5) {
474
- newX = that.x;
475
- deltaX = 0;
630
+ if (that.absDistX < 6 && that.absDistY < 6) {
631
+ return;
476
632
  }
477
- }
478
633
 
479
- that.moved = true;
480
- that._pos(newX, newY);
481
- that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
482
- that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;
634
+ // Lock direction
635
+ if (that.options.lockDirection) {
636
+ if (that.absDistX > that.absDistY + 5) {
637
+ newY = that.y;
638
+ deltaY = 0;
639
+ } else if (that.absDistY > that.absDistX + 5) {
640
+ newX = that.x;
641
+ deltaX = 0;
642
+ }
643
+ }
483
644
 
484
- if (timestamp - that.startTime > 300) {
485
- that.startTime = timestamp;
486
- that.startX = that.x;
487
- that.startY = that.y;
488
- }
489
-
490
- if (that.options.onScrollMove) that.options.onScrollMove.call(that, e);
491
- },
492
-
493
- _end: function (e) {
494
- if (hasTouch && e.touches.length !== 0) return;
495
-
496
- var that = this,
497
- point = hasTouch ? e.changedTouches[0] : e,
498
- target, ev,
499
- momentumX = { dist:0, time:0 },
500
- momentumY = { dist:0, time:0 },
501
- duration = (e.timeStamp || Date.now()) - that.startTime,
502
- newPosX = that.x,
503
- newPosY = that.y,
504
- distX, distY,
505
- newDuration,
506
- snap,
507
- scale;
508
-
509
- that._unbind(MOVE_EV, window);
510
- that._unbind(END_EV, window);
511
- that._unbind(CANCEL_EV, window);
512
-
513
- if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e);
514
-
515
- if (that.zoomed) {
516
- scale = that.scale * that.lastScale;
517
- scale = Math.max(that.options.zoomMin, scale);
518
- scale = Math.min(that.options.zoomMax, scale);
519
- that.lastScale = scale / that.scale;
520
- that.scale = scale;
645
+ that.moved = true;
646
+ that._pos(newX, newY);
647
+ that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
648
+ that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;
521
649
 
522
- that.x = that.originX - that.originX * that.lastScale + that.x;
523
- that.y = that.originY - that.originY * that.lastScale + that.y;
524
-
525
- that.scroller.style[transitionDuration] = '200ms';
526
- that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + that.scale + ')' + translateZ;
527
-
528
- that.zoomed = false;
529
- that.refresh();
650
+ if (timestamp - that.startTime > 300) {
651
+ that.startTime = timestamp;
652
+ that.startX = that.x;
653
+ that.startY = that.y;
654
+ }
530
655
 
531
- if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e);
532
- return;
533
- }
656
+ if (that.options.onScrollMove) that.options.onScrollMove.call(that, e);
657
+ },
658
+
659
+ _end(e) {
660
+ if (hasTouch && e.touches.length !== 0) return;
661
+
662
+ var that = this,
663
+ point = hasTouch ? e.changedTouches[0] : e,
664
+ target,
665
+ ev,
666
+ momentumX = { dist: 0, time: 0 },
667
+ momentumY = { dist: 0, time: 0 },
668
+ duration = (e.timeStamp || Date.now()) - that.startTime,
669
+ newPosX = that.x,
670
+ newPosY = that.y,
671
+ distX,
672
+ distY,
673
+ newDuration,
674
+ snap,
675
+ scale;
676
+
677
+ that._unbind(MOVE_EV, window);
678
+ that._unbind(END_EV, window);
679
+ that._unbind(CANCEL_EV, window);
680
+
681
+ if (that.options.onBeforeScrollEnd)
682
+ that.options.onBeforeScrollEnd.call(that, e);
683
+
684
+ if (that.zoomed) {
685
+ scale = that.scale * that.lastScale;
686
+ scale = Math.max(that.options.zoomMin, scale);
687
+ scale = Math.min(that.options.zoomMax, scale);
688
+ that.lastScale = scale / that.scale;
689
+ that.scale = scale;
690
+
691
+ that.x = that.originX - that.originX * that.lastScale + that.x;
692
+ that.y = that.originY - that.originY * that.lastScale + that.y;
693
+
694
+ that.scroller.style[transitionDuration] = "200ms";
695
+ that.scroller.style[transform] =
696
+ "translate(" +
697
+ that.x +
698
+ "px," +
699
+ that.y +
700
+ "px) scale(" +
701
+ that.scale +
702
+ ")" +
703
+ translateZ;
704
+
705
+ that.zoomed = false;
706
+ that.refresh();
707
+
708
+ if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e);
709
+ return;
710
+ }
534
711
 
535
- if (!that.moved) {
536
- if (hasTouch) {
537
- if (that.doubleTapTimer && that.options.zoom) {
538
- // Double tapped
539
- clearTimeout(that.doubleTapTimer);
540
- that.doubleTapTimer = null;
541
- if (that.options.onZoomStart) that.options.onZoomStart.call(that, e);
542
- that.zoom(that.pointX, that.pointY, that.scale == 1 ? that.options.doubleTapZoom : 1);
543
- if (that.options.onZoomEnd) {
544
- setTimeout(function() {
545
- that.options.onZoomEnd.call(that, e);
546
- }, 200); // 200 is default zoom duration
547
- }
548
- } else if (this.options.handleClick) {
549
- that.doubleTapTimer = setTimeout(function () {
712
+ if (!that.moved) {
713
+ if (hasTouch) {
714
+ if (that.doubleTapTimer && that.options.zoom) {
715
+ // Double tapped
716
+ clearTimeout(that.doubleTapTimer);
550
717
  that.doubleTapTimer = null;
551
-
552
- // Find the last touched element
553
- target = point.target;
554
- while (target.nodeType != 1) target = target.parentNode;
555
-
556
- if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA') {
557
- ev = doc.createEvent('MouseEvents');
558
- ev.initMouseEvent('click', true, true, e.view, 1,
559
- point.screenX, point.screenY, point.clientX, point.clientY,
560
- e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
561
- 0, null);
562
- ev._fake = true;
563
- target.dispatchEvent(ev);
718
+ if (that.options.onZoomStart)
719
+ that.options.onZoomStart.call(that, e);
720
+ that.zoom(
721
+ that.pointX,
722
+ that.pointY,
723
+ that.scale == 1 ? that.options.doubleTapZoom : 1
724
+ );
725
+
726
+ if (that.options.onZoomEnd) {
727
+ setTimeout(function () {
728
+ that.options.onZoomEnd.call(that, e);
729
+ }, 200); // 200 is default zoom duration
564
730
  }
565
- }, that.options.zoom ? 250 : 0);
731
+ } else if (this.options.handleClick) {
732
+ that.doubleTapTimer = setTimeout(
733
+ function () {
734
+ that.doubleTapTimer = null;
735
+
736
+ // Find the last touched element
737
+ target = point.target;
738
+ while (target.nodeType != 1) target = target.parentNode;
739
+
740
+ if (
741
+ target.tagName != "SELECT" &&
742
+ target.tagName != "INPUT" &&
743
+ target.tagName != "TEXTAREA"
744
+ ) {
745
+ ev = doc.createEvent("MouseEvents");
746
+ ev.initMouseEvent(
747
+ "click",
748
+ true,
749
+ true,
750
+ e.view,
751
+ 1,
752
+ point.screenX,
753
+ point.screenY,
754
+ point.clientX,
755
+ point.clientY,
756
+ e.ctrlKey,
757
+ e.altKey,
758
+ e.shiftKey,
759
+ e.metaKey,
760
+ 0,
761
+ null
762
+ );
763
+
764
+ ev._fake = true;
765
+ target.dispatchEvent(ev);
766
+ }
767
+ },
768
+ that.options.zoom ? 250 : 0
769
+ );
770
+ }
566
771
  }
567
- }
568
772
 
569
- that._resetPos(400);
773
+ that._resetPos(400);
570
774
 
571
- if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
572
- return;
573
- }
775
+ if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
776
+ return;
777
+ }
574
778
 
575
- if (duration < 300 && that.options.momentum) {
576
- momentumX = newPosX ? that._momentum(newPosX - that.startX, duration, -that.x, that.scrollerW - that.wrapperW + that.x, that.options.bounce ? that.wrapperW : 0) : momentumX;
577
- momentumY = newPosY ? that._momentum(newPosY - that.startY, duration, -that.y, (that.maxScrollY < 0 ? that.scrollerH - that.wrapperH + that.y - that.minScrollY : 0), that.options.bounce ? that.wrapperH : 0) : momentumY;
779
+ if (duration < 300 && that.options.momentum) {
780
+ momentumX = newPosX
781
+ ? that._momentum(
782
+ newPosX - that.startX,
783
+ duration,
784
+ -that.x,
785
+ that.scrollerW - that.wrapperW + that.x,
786
+ that.options.bounce ? that.wrapperW : 0
787
+ )
788
+ : momentumX;
789
+ momentumY = newPosY
790
+ ? that._momentum(
791
+ newPosY - that.startY,
792
+ duration,
793
+ -that.y,
794
+ that.maxScrollY < 0
795
+ ? that.scrollerH - that.wrapperH + that.y - that.minScrollY
796
+ : 0,
797
+ that.options.bounce ? that.wrapperH : 0
798
+ )
799
+ : momentumY;
800
+
801
+ newPosX = that.x + momentumX.dist;
802
+ newPosY = that.y + momentumY.dist;
803
+
804
+ if (
805
+ (that.x > 0 && newPosX > 0) ||
806
+ (that.x < that.maxScrollX && newPosX < that.maxScrollX)
807
+ )
808
+ momentumX = { dist: 0, time: 0 };
809
+ if (
810
+ (that.y > that.minScrollY && newPosY > that.minScrollY) ||
811
+ (that.y < that.maxScrollY && newPosY < that.maxScrollY)
812
+ )
813
+ momentumY = { dist: 0, time: 0 };
814
+ }
578
815
 
579
- newPosX = that.x + momentumX.dist;
580
- newPosY = that.y + momentumY.dist;
816
+ if (momentumX.dist || momentumY.dist) {
817
+ newDuration = m.max(m.max(momentumX.time, momentumY.time), 10);
818
+
819
+ // Do we need to snap?
820
+ if (that.options.snap) {
821
+ distX = newPosX - that.absStartX;
822
+ distY = newPosY - that.absStartY;
823
+ if (
824
+ m.abs(distX) < that.options.snapThreshold &&
825
+ m.abs(distY) < that.options.snapThreshold
826
+ ) {
827
+ that.scrollTo(that.absStartX, that.absStartY, 200);
828
+ } else {
829
+ snap = that._snap(newPosX, newPosY);
830
+ newPosX = snap.x;
831
+ newPosY = snap.y;
832
+ newDuration = m.max(snap.time, newDuration);
833
+ }
834
+ }
581
835
 
582
- if ((that.x > 0 && newPosX > 0) || (that.x < that.maxScrollX && newPosX < that.maxScrollX)) momentumX = { dist:0, time:0 };
583
- if ((that.y > that.minScrollY && newPosY > that.minScrollY) || (that.y < that.maxScrollY && newPosY < that.maxScrollY)) momentumY = { dist:0, time:0 };
584
- }
836
+ that.scrollTo(m.round(newPosX), m.round(newPosY), newDuration);
585
837
 
586
- if (momentumX.dist || momentumY.dist) {
587
- newDuration = m.max(m.max(momentumX.time, momentumY.time), 10);
838
+ if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
839
+ return;
840
+ }
588
841
 
589
842
  // Do we need to snap?
590
843
  if (that.options.snap) {
591
844
  distX = newPosX - that.absStartX;
592
845
  distY = newPosY - that.absStartY;
593
- if (m.abs(distX) < that.options.snapThreshold && m.abs(distY) < that.options.snapThreshold) { that.scrollTo(that.absStartX, that.absStartY, 200); }
846
+ if (
847
+ m.abs(distX) < that.options.snapThreshold &&
848
+ m.abs(distY) < that.options.snapThreshold
849
+ )
850
+ that.scrollTo(that.absStartX, that.absStartY, 200);
594
851
  else {
595
- snap = that._snap(newPosX, newPosY);
596
- newPosX = snap.x;
597
- newPosY = snap.y;
598
- newDuration = m.max(snap.time, newDuration);
852
+ snap = that._snap(that.x, that.y);
853
+ if (snap.x != that.x || snap.y != that.y)
854
+ that.scrollTo(snap.x, snap.y, snap.time);
599
855
  }
600
- }
601
856
 
602
- that.scrollTo(m.round(newPosX), m.round(newPosY), newDuration);
857
+ if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
858
+ return;
859
+ }
603
860
 
861
+ that._resetPos(200);
604
862
  if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
605
- return;
606
- }
863
+ },
864
+
865
+ _resetPos(time) {
866
+ var that = this,
867
+ resetX =
868
+ that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x,
869
+ resetY =
870
+ that.y >= that.minScrollY || that.maxScrollY > 0
871
+ ? that.minScrollY
872
+ : that.y < that.maxScrollY
873
+ ? that.maxScrollY
874
+ : that.y;
875
+
876
+ if (resetX == that.x && resetY == that.y) {
877
+ if (that.moved) {
878
+ that.moved = false;
879
+ if (that.options.onScrollEnd) that.options.onScrollEnd.call(that); // Execute custom code on scroll end
880
+ }
607
881
 
608
- // Do we need to snap?
609
- if (that.options.snap) {
610
- distX = newPosX - that.absStartX;
611
- distY = newPosY - that.absStartY;
612
- if (m.abs(distX) < that.options.snapThreshold && m.abs(distY) < that.options.snapThreshold) that.scrollTo(that.absStartX, that.absStartY, 200);
613
- else {
614
- snap = that._snap(that.x, that.y);
615
- if (snap.x != that.x || snap.y != that.y) that.scrollTo(snap.x, snap.y, snap.time);
616
- }
882
+ if (that.hScrollbar && that.options.hideScrollbar) {
883
+ if (vendor == "webkit")
884
+ that.hScrollbarWrapper.style[transitionDelay] = "300ms";
885
+ that.hScrollbarWrapper.style.opacity = "0";
886
+ }
887
+ if (that.vScrollbar && that.options.hideScrollbar) {
888
+ if (vendor == "webkit")
889
+ that.vScrollbarWrapper.style[transitionDelay] = "300ms";
890
+ that.vScrollbarWrapper.style.opacity = "0";
891
+ }
617
892
 
618
- if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
619
- return;
620
- }
893
+ return;
894
+ }
621
895
 
622
- that._resetPos(200);
623
- if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
624
- },
625
-
626
- _resetPos: function (time) {
627
- var that = this,
628
- resetX = that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x,
629
- resetY = that.y >= that.minScrollY || that.maxScrollY > 0 ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y;
630
-
631
- if (resetX == that.x && resetY == that.y) {
632
- if (that.moved) {
633
- that.moved = false;
634
- if (that.options.onScrollEnd) that.options.onScrollEnd.call(that); // Execute custom code on scroll end
896
+ that.scrollTo(resetX, resetY, time || 0);
897
+ },
898
+
899
+ _wheel(e) {
900
+ var that = this,
901
+ wheelDeltaX,
902
+ wheelDeltaY,
903
+ deltaX,
904
+ deltaY,
905
+ deltaScale;
906
+
907
+ if ("wheelDeltaX" in e) {
908
+ wheelDeltaX = e.wheelDeltaX / 12;
909
+ wheelDeltaY = e.wheelDeltaY / 12;
910
+ } else if ("wheelDelta" in e) {
911
+ wheelDeltaX = wheelDeltaY = e.wheelDelta / 12;
912
+ } else if ("detail" in e) {
913
+ wheelDeltaX = wheelDeltaY = -e.detail * 3;
914
+ } else {
915
+ return;
635
916
  }
636
917
 
637
- if (that.hScrollbar && that.options.hideScrollbar) {
638
- if (vendor == 'webkit') that.hScrollbarWrapper.style[transitionDelay] = '300ms';
639
- that.hScrollbarWrapper.style.opacity = '0';
918
+ if (that.options.wheelAction == "zoom") {
919
+ deltaScale =
920
+ that.scale *
921
+ Math.pow(
922
+ 2,
923
+ (1 / 3) * (wheelDeltaY ? wheelDeltaY / Math.abs(wheelDeltaY) : 0)
924
+ );
925
+
926
+ if (deltaScale < that.options.zoomMin)
927
+ deltaScale = that.options.zoomMin;
928
+ if (deltaScale > that.options.zoomMax)
929
+ deltaScale = that.options.zoomMax;
930
+
931
+ if (deltaScale != that.scale) {
932
+ if (!that.wheelZoomCount && that.options.onZoomStart)
933
+ that.options.onZoomStart.call(that, e);
934
+ that.wheelZoomCount++;
935
+
936
+ that.zoom(e.pageX, e.pageY, deltaScale, 400);
937
+
938
+ setTimeout(function () {
939
+ that.wheelZoomCount--;
940
+ if (!that.wheelZoomCount && that.options.onZoomEnd)
941
+ that.options.onZoomEnd.call(that, e);
942
+ }, 400);
943
+ }
944
+
945
+ return;
640
946
  }
641
- if (that.vScrollbar && that.options.hideScrollbar) {
642
- if (vendor == 'webkit') that.vScrollbarWrapper.style[transitionDelay] = '300ms';
643
- that.vScrollbarWrapper.style.opacity = '0';
947
+
948
+ deltaX = that.x + wheelDeltaX;
949
+ deltaY = that.y + wheelDeltaY;
950
+
951
+ if (deltaX > 0) deltaX = 0;
952
+ else if (deltaX < that.maxScrollX) deltaX = that.maxScrollX;
953
+
954
+ if (deltaY > that.minScrollY) deltaY = that.minScrollY;
955
+ else if (deltaY < that.maxScrollY) deltaY = that.maxScrollY;
956
+
957
+ if (that.maxScrollY < 0) {
958
+ that.scrollTo(deltaX, deltaY, 0);
644
959
  }
960
+ },
645
961
 
646
- return;
647
- }
962
+ _transitionEnd(e) {
963
+ var that = this;
648
964
 
649
- that.scrollTo(resetX, resetY, time || 0);
650
- },
651
-
652
- _wheel: function (e) {
653
- var that = this,
654
- wheelDeltaX, wheelDeltaY,
655
- deltaX, deltaY,
656
- deltaScale;
657
-
658
- if ('wheelDeltaX' in e) {
659
- wheelDeltaX = e.wheelDeltaX / 12;
660
- wheelDeltaY = e.wheelDeltaY / 12;
661
- } else if('wheelDelta' in e) {
662
- wheelDeltaX = wheelDeltaY = e.wheelDelta / 12;
663
- } else if ('detail' in e) {
664
- wheelDeltaX = wheelDeltaY = -e.detail * 3;
665
- } else {
666
- return;
667
- }
668
-
669
- if (that.options.wheelAction == 'zoom') {
670
- deltaScale = that.scale * Math.pow(2, 1/3 * (wheelDeltaY ? wheelDeltaY / Math.abs(wheelDeltaY) : 0));
671
- if (deltaScale < that.options.zoomMin) deltaScale = that.options.zoomMin;
672
- if (deltaScale > that.options.zoomMax) deltaScale = that.options.zoomMax;
673
-
674
- if (deltaScale != that.scale) {
675
- if (!that.wheelZoomCount && that.options.onZoomStart) that.options.onZoomStart.call(that, e);
676
- that.wheelZoomCount++;
677
-
678
- that.zoom(e.pageX, e.pageY, deltaScale, 400);
679
-
680
- setTimeout(function() {
681
- that.wheelZoomCount--;
682
- if (!that.wheelZoomCount && that.options.onZoomEnd) that.options.onZoomEnd.call(that, e);
683
- }, 400);
965
+ if (e.target != that.scroller) return;
966
+
967
+ that._unbind(TRNEND_EV);
968
+
969
+ that._startAni();
970
+ },
971
+
972
+ /**
973
+ *
974
+ * Utilities
975
+ *
976
+ */
977
+ _startAni() {
978
+ var that = this,
979
+ startX = that.x,
980
+ startY = that.y,
981
+ startTime = Date.now(),
982
+ step,
983
+ easeOut,
984
+ animate;
985
+
986
+ if (that.animating) return;
987
+
988
+ if (!that.steps.length) {
989
+ that._resetPos(400);
990
+ return;
684
991
  }
685
-
686
- return;
687
- }
688
-
689
- deltaX = that.x + wheelDeltaX;
690
- deltaY = that.y + wheelDeltaY;
691
-
692
- if (deltaX > 0) deltaX = 0;
693
- else if (deltaX < that.maxScrollX) deltaX = that.maxScrollX;
694
-
695
- if (deltaY > that.minScrollY) deltaY = that.minScrollY;
696
- else if (deltaY < that.maxScrollY) deltaY = that.maxScrollY;
697
-
698
- if (that.maxScrollY < 0) {
699
- that.scrollTo(deltaX, deltaY, 0);
700
- }
701
- },
702
-
703
- _transitionEnd: function (e) {
704
- var that = this;
705
-
706
- if (e.target != that.scroller) return;
707
-
708
- that._unbind(TRNEND_EV);
709
-
710
- that._startAni();
711
- },
712
-
713
-
714
- /**
715
- *
716
- * Utilities
717
- *
718
- */
719
- _startAni: function () {
720
- var that = this,
721
- startX = that.x, startY = that.y,
722
- startTime = Date.now(),
723
- step, easeOut,
724
- animate;
725
-
726
- if (that.animating) return;
727
-
728
- if (!that.steps.length) {
729
- that._resetPos(400);
730
- return;
731
- }
732
-
733
- step = that.steps.shift();
734
-
735
- if (step.x == startX && step.y == startY) step.time = 0;
736
-
737
- that.animating = true;
738
- that.moved = true;
739
-
740
- if (that.options.useTransition) {
741
- that._transitionTime(step.time);
742
- that._pos(step.x, step.y);
743
- that.animating = false;
744
- if (step.time) that._bind(TRNEND_EV);
745
- else that._resetPos(0);
746
- return;
747
- }
748
992
 
749
- animate = function () {
750
- var now = Date.now(),
751
- newX, newY;
993
+ step = that.steps.shift();
994
+
995
+ if (step.x == startX && step.y == startY) step.time = 0;
996
+
997
+ that.animating = true;
998
+ that.moved = true;
752
999
 
753
- if (now >= startTime + step.time) {
1000
+ if (that.options.useTransition) {
1001
+ that._transitionTime(step.time);
754
1002
  that._pos(step.x, step.y);
755
1003
  that.animating = false;
756
- if (that.options.onAnimationEnd) that.options.onAnimationEnd.call(that); // Execute custom code on animation end
757
- that._startAni();
1004
+ if (step.time) that._bind(TRNEND_EV);
1005
+ else that._resetPos(0);
758
1006
  return;
759
1007
  }
760
1008
 
761
- now = (now - startTime) / step.time - 1;
762
- easeOut = m.sqrt(1 - now * now);
763
- newX = (step.x - startX) * easeOut + startX;
764
- newY = (step.y - startY) * easeOut + startY;
765
- that._pos(newX, newY);
766
- if (that.animating) that.aniTime = nextFrame(animate);
767
- };
1009
+ animate = function () {
1010
+ var now = Date.now(),
1011
+ newX,
1012
+ newY;
1013
+
1014
+ if (now >= startTime + step.time) {
1015
+ that._pos(step.x, step.y);
1016
+ that.animating = false;
1017
+ if (that.options.onAnimationEnd)
1018
+ that.options.onAnimationEnd.call(that); // Execute custom code on animation end
1019
+ that._startAni();
1020
+ return;
1021
+ }
768
1022
 
769
- animate();
770
- },
771
-
772
- _transitionTime: function (time) {
773
- time += 'ms';
774
- this.scroller.style[transitionDuration] = time;
775
- if (this.hScrollbar) this.hScrollbarIndicator.style[transitionDuration] = time;
776
- if (this.vScrollbar) this.vScrollbarIndicator.style[transitionDuration] = time;
777
- },
778
-
779
- _momentum: function (dist, time, maxDistUpper, maxDistLower, size) {
780
- var deceleration = 0.0006,
781
- speed = m.abs(dist) / time,
782
- newDist = (speed * speed) / (2 * deceleration),
783
- newTime = 0, outsideDist = 0;
784
-
785
- // Proportinally reduce speed if we are outside of the boundaries
786
- if (dist > 0 && newDist > maxDistUpper) {
787
- outsideDist = size / (6 / (newDist / speed * deceleration));
788
- maxDistUpper = maxDistUpper + outsideDist;
789
- speed = speed * maxDistUpper / newDist;
790
- newDist = maxDistUpper;
791
- } else if (dist < 0 && newDist > maxDistLower) {
792
- outsideDist = size / (6 / (newDist / speed * deceleration));
793
- maxDistLower = maxDistLower + outsideDist;
794
- speed = speed * maxDistLower / newDist;
795
- newDist = maxDistLower;
796
- }
1023
+ now = (now - startTime) / step.time - 1;
1024
+ easeOut = m.sqrt(1 - now * now);
1025
+ newX = (step.x - startX) * easeOut + startX;
1026
+ newY = (step.y - startY) * easeOut + startY;
1027
+ that._pos(newX, newY);
1028
+ if (that.animating) that.aniTime = nextFrame(animate);
1029
+ };
797
1030
 
798
- newDist = newDist * (dist < 0 ? -1 : 1);
799
- newTime = speed / deceleration;
1031
+ animate();
1032
+ },
1033
+
1034
+ _transitionTime(time) {
1035
+ time += "ms";
1036
+ this.scroller.style[transitionDuration] = time;
1037
+ if (this.hScrollbar)
1038
+ this.hScrollbarIndicator.style[transitionDuration] = time;
1039
+ if (this.vScrollbar)
1040
+ this.vScrollbarIndicator.style[transitionDuration] = time;
1041
+ },
1042
+
1043
+ _momentum(dist, time, maxDistUpper, maxDistLower, size) {
1044
+ var deceleration = 0.0006,
1045
+ speed = m.abs(dist) / time,
1046
+ newDist = (speed * speed) / (2 * deceleration),
1047
+ newTime = 0,
1048
+ outsideDist = 0;
1049
+
1050
+ // Proportinally reduce speed if we are outside of the boundaries
1051
+ if (dist > 0 && newDist > maxDistUpper) {
1052
+ outsideDist = size / (6 / ((newDist / speed) * deceleration));
1053
+ maxDistUpper = maxDistUpper + outsideDist;
1054
+ speed = (speed * maxDistUpper) / newDist;
1055
+ newDist = maxDistUpper;
1056
+ } else if (dist < 0 && newDist > maxDistLower) {
1057
+ outsideDist = size / (6 / ((newDist / speed) * deceleration));
1058
+ maxDistLower = maxDistLower + outsideDist;
1059
+ speed = (speed * maxDistLower) / newDist;
1060
+ newDist = maxDistLower;
1061
+ }
800
1062
 
801
- return { dist: newDist, time: m.round(newTime) };
802
- },
1063
+ newDist = newDist * (dist < 0 ? -1 : 1);
1064
+ newTime = speed / deceleration;
803
1065
 
804
- _offset: function (el) {
805
- var left = -el.offsetLeft,
806
- top = -el.offsetTop;
807
-
808
- while (el = el.offsetParent) {
809
- left -= el.offsetLeft;
810
- top -= el.offsetTop;
811
- }
812
-
813
- if (el != this.wrapper) {
814
- left *= this.scale;
815
- top *= this.scale;
816
- }
1066
+ return { dist: newDist, time: m.round(newTime) };
1067
+ },
1068
+
1069
+ _offset(el) {
1070
+ var left = -el.offsetLeft,
1071
+ top = -el.offsetTop;
817
1072
 
818
- return { left: left, top: top };
819
- },
820
-
821
- _snap: function (x, y) {
822
- var that = this,
823
- i, l,
824
- page, time,
825
- sizeX, sizeY;
826
-
827
- // Check page X
828
- page = that.pagesX.length - 1;
829
- for (i=0, l=that.pagesX.length; i<l; i++) {
830
- if (x >= that.pagesX[i]) {
831
- page = i;
832
- break;
1073
+ while ((el = el.offsetParent)) {
1074
+ left -= el.offsetLeft;
1075
+ top -= el.offsetTop;
833
1076
  }
834
- }
835
- if (page == that.currPageX && page > 0 && that.dirX < 0) page--;
836
- x = that.pagesX[page];
837
- sizeX = m.abs(x - that.pagesX[that.currPageX]);
838
- sizeX = sizeX ? m.abs(that.x - x) / sizeX * 500 : 0;
839
- that.currPageX = page;
840
-
841
- // Check page Y
842
- page = that.pagesY.length-1;
843
- for (i=0; i<page; i++) {
844
- if (y >= that.pagesY[i]) {
845
- page = i;
846
- break;
1077
+
1078
+ if (el != this.wrapper) {
1079
+ left *= this.scale;
1080
+ top *= this.scale;
847
1081
  }
848
- }
849
- if (page == that.currPageY && page > 0 && that.dirY < 0) page--;
850
- y = that.pagesY[page];
851
- sizeY = m.abs(y - that.pagesY[that.currPageY]);
852
- sizeY = sizeY ? m.abs(that.y - y) / sizeY * 500 : 0;
853
- that.currPageY = page;
854
-
855
- // Snap with constant speed (proportional duration)
856
- time = m.round(m.max(sizeX, sizeY)) || 200;
857
-
858
- return { x: x, y: y, time: time };
859
- },
860
-
861
- _bind: function (type, el, bubble) {
862
- (el || this.scroller).addEventListener(type, this, !!bubble);
863
- },
864
-
865
- _unbind: function (type, el, bubble) {
866
- (el || this.scroller).removeEventListener(type, this, !!bubble);
867
- },
868
-
869
-
870
- /**
871
- *
872
- * Public methods
873
- *
874
- */
875
- destroy: function () {
876
- var that = this;
877
-
878
- that.scroller.style[transform] = '';
879
-
880
- // Remove the scrollbars
881
- that.hScrollbar = false;
882
- that.vScrollbar = false;
883
- that._scrollbar('h');
884
- that._scrollbar('v');
885
-
886
- // Remove the event listeners
887
- that._unbind(RESIZE_EV, window);
888
- that._unbind(START_EV);
889
- that._unbind(MOVE_EV, window);
890
- that._unbind(END_EV, window);
891
- that._unbind(CANCEL_EV, window);
892
-
893
- if (!that.options.hasTouch) {
894
- that._unbind('DOMMouseScroll');
895
- that._unbind('mousewheel');
896
- }
897
-
898
- if (that.options.useTransition) that._unbind(TRNEND_EV);
899
-
900
- if (that.options.checkDOMChanges) clearInterval(that.checkDOMTime);
901
-
902
- if (that.options.onDestroy) that.options.onDestroy.call(that);
903
- },
904
-
905
- refresh: function () {
906
- var that = this,
907
- offset,
908
- i, l,
909
- els,
910
- pos = 0,
911
- page = 0;
912
-
913
- if (that.scale < that.options.zoomMin) that.scale = that.options.zoomMin;
914
- that.wrapperW = that.wrapper.clientWidth || 1;
915
- that.wrapperH = that.wrapper.clientHeight || 1;
916
-
917
- that.minScrollY = -that.options.topOffset || 0;
918
- that.scrollerW = m.round(that.scroller.offsetWidth * that.scale);
919
- that.scrollerH = m.round((that.scroller.offsetHeight + that.minScrollY) * that.scale);
920
- that.maxScrollX = that.wrapperW - that.scrollerW;
921
- that.maxScrollY = that.wrapperH - that.scrollerH + that.minScrollY;
922
- that.dirX = 0;
923
- that.dirY = 0;
924
-
925
- if (that.options.onRefresh) that.options.onRefresh.call(that);
926
-
927
- that.hScroll = that.options.hScroll && that.maxScrollX < 0;
928
- that.vScroll = that.options.vScroll && (!that.options.bounceLock && !that.hScroll || that.scrollerH > that.wrapperH);
929
-
930
- that.hScrollbar = that.hScroll && that.options.hScrollbar;
931
- that.vScrollbar = that.vScroll && that.options.vScrollbar && that.scrollerH > that.wrapperH;
932
-
933
- offset = that._offset(that.wrapper);
934
- that.wrapperOffsetLeft = -offset.left;
935
- that.wrapperOffsetTop = -offset.top;
936
-
937
- // Prepare snap
938
- if (typeof that.options.snap == 'string') {
939
- that.pagesX = [];
940
- that.pagesY = [];
941
- els = that.scroller.querySelectorAll(that.options.snap);
942
- for (i=0, l=els.length; i<l; i++) {
943
- pos = that._offset(els[i]);
944
- pos.left += that.wrapperOffsetLeft;
945
- pos.top += that.wrapperOffsetTop;
946
- that.pagesX[i] = pos.left < that.maxScrollX ? that.maxScrollX : pos.left * that.scale;
947
- that.pagesY[i] = pos.top < that.maxScrollY ? that.maxScrollY : pos.top * that.scale;
1082
+
1083
+ return { left: left, top: top };
1084
+ },
1085
+
1086
+ _snap(x, y) {
1087
+ var that = this,
1088
+ i,
1089
+ l,
1090
+ page,
1091
+ time,
1092
+ sizeX,
1093
+ sizeY;
1094
+
1095
+ // Check page X
1096
+ page = that.pagesX.length - 1;
1097
+ for (i = 0, l = that.pagesX.length; i < l; i++) {
1098
+ if (x >= that.pagesX[i]) {
1099
+ page = i;
1100
+ break;
1101
+ }
948
1102
  }
949
- } else if (that.options.snap) {
950
- that.pagesX = [];
951
- while (pos >= that.maxScrollX) {
952
- that.pagesX[page] = pos;
953
- pos = pos - that.wrapperW;
954
- page++;
1103
+ if (page == that.currPageX && page > 0 && that.dirX < 0) page--;
1104
+ x = that.pagesX[page];
1105
+ sizeX = m.abs(x - that.pagesX[that.currPageX]);
1106
+ sizeX = sizeX ? (m.abs(that.x - x) / sizeX) * 500 : 0;
1107
+ that.currPageX = page;
1108
+
1109
+ // Check page Y
1110
+ page = that.pagesY.length - 1;
1111
+ for (i = 0; i < page; i++) {
1112
+ if (y >= that.pagesY[i]) {
1113
+ page = i;
1114
+ break;
1115
+ }
955
1116
  }
956
- if (that.maxScrollX%that.wrapperW) that.pagesX[that.pagesX.length] = that.maxScrollX - that.pagesX[that.pagesX.length-1] + that.pagesX[that.pagesX.length-1];
957
-
958
- pos = 0;
959
- page = 0;
960
- that.pagesY = [];
961
- while (pos >= that.maxScrollY) {
962
- that.pagesY[page] = pos;
963
- pos = pos - that.wrapperH;
964
- page++;
1117
+ if (page == that.currPageY && page > 0 && that.dirY < 0) page--;
1118
+ y = that.pagesY[page];
1119
+ sizeY = m.abs(y - that.pagesY[that.currPageY]);
1120
+ sizeY = sizeY ? (m.abs(that.y - y) / sizeY) * 500 : 0;
1121
+ that.currPageY = page;
1122
+
1123
+ // Snap with constant speed (proportional duration)
1124
+ time = m.round(m.max(sizeX, sizeY)) || 200;
1125
+
1126
+ return { x: x, y: y, time: time };
1127
+ },
1128
+
1129
+ _bind(type, el, bubble) {
1130
+ (el || this.scroller).addEventListener(type, this, !!bubble);
1131
+ },
1132
+
1133
+ _unbind(type, el, bubble) {
1134
+ (el || this.scroller).removeEventListener(type, this, !!bubble);
1135
+ },
1136
+
1137
+ /**
1138
+ *
1139
+ * Public methods
1140
+ *
1141
+ */
1142
+ destroy() {
1143
+ var that = this;
1144
+
1145
+ that.scroller.style[transform] = "";
1146
+
1147
+ // Remove the scrollbars
1148
+ that.hScrollbar = false;
1149
+ that.vScrollbar = false;
1150
+ that._scrollbar("h");
1151
+ that._scrollbar("v");
1152
+
1153
+ // Remove the event listeners
1154
+ that._unbind(RESIZE_EV, window);
1155
+ that._unbind(START_EV);
1156
+ that._unbind(MOVE_EV, window);
1157
+ that._unbind(END_EV, window);
1158
+ that._unbind(CANCEL_EV, window);
1159
+
1160
+ if (!that.options.hasTouch) {
1161
+ that._unbind("DOMMouseScroll");
1162
+ that._unbind("mousewheel");
965
1163
  }
966
- if (that.maxScrollY%that.wrapperH) that.pagesY[that.pagesY.length] = that.maxScrollY - that.pagesY[that.pagesY.length-1] + that.pagesY[that.pagesY.length-1];
967
- }
968
1164
 
969
- // Prepare the scrollbars
970
- that._scrollbar('h');
971
- that._scrollbar('v');
1165
+ if (that.options.useTransition) that._unbind(TRNEND_EV);
1166
+
1167
+ if (that.options.checkDOMChanges) clearInterval(that.checkDOMTime);
1168
+
1169
+ if (that.options.onDestroy) that.options.onDestroy.call(that);
1170
+ },
1171
+
1172
+ refresh() {
1173
+ var that = this,
1174
+ offset,
1175
+ i,
1176
+ l,
1177
+ els,
1178
+ pos = 0,
1179
+ page = 0;
1180
+
1181
+ if (that.scale < that.options.zoomMin) that.scale = that.options.zoomMin;
1182
+ that.wrapperW = that.wrapper.clientWidth || 1;
1183
+ that.wrapperH = that.wrapper.clientHeight || 1;
1184
+
1185
+ that.minScrollY = -that.options.topOffset || 0;
1186
+ that.scrollerW = m.round(that.scroller.offsetWidth * that.scale);
1187
+ that.scrollerH = m.round(
1188
+ (that.scroller.offsetHeight + that.minScrollY) * that.scale
1189
+ );
1190
+
1191
+ that.maxScrollX = that.wrapperW - that.scrollerW;
1192
+ that.maxScrollY = that.wrapperH - that.scrollerH + that.minScrollY;
1193
+ that.dirX = 0;
1194
+ that.dirY = 0;
1195
+
1196
+ if (that.options.onRefresh) that.options.onRefresh.call(that);
1197
+
1198
+ that.hScroll = that.options.hScroll && that.maxScrollX < 0;
1199
+ that.vScroll =
1200
+ that.options.vScroll &&
1201
+ ((!that.options.bounceLock && !that.hScroll) ||
1202
+ that.scrollerH > that.wrapperH);
1203
+
1204
+ that.hScrollbar = that.hScroll && that.options.hScrollbar;
1205
+ that.vScrollbar =
1206
+ that.vScroll &&
1207
+ that.options.vScrollbar &&
1208
+ that.scrollerH > that.wrapperH;
1209
+
1210
+ offset = that._offset(that.wrapper);
1211
+ that.wrapperOffsetLeft = -offset.left;
1212
+ that.wrapperOffsetTop = -offset.top;
1213
+
1214
+ // Prepare snap
1215
+ if (typeof that.options.snap == "string") {
1216
+ that.pagesX = [];
1217
+ that.pagesY = [];
1218
+ els = that.scroller.querySelectorAll(that.options.snap);
1219
+ for (i = 0, l = els.length; i < l; i++) {
1220
+ pos = that._offset(els[i]);
1221
+ pos.left += that.wrapperOffsetLeft;
1222
+ pos.top += that.wrapperOffsetTop;
1223
+ that.pagesX[i] =
1224
+ pos.left < that.maxScrollX
1225
+ ? that.maxScrollX
1226
+ : pos.left * that.scale;
1227
+ that.pagesY[i] =
1228
+ pos.top < that.maxScrollY ? that.maxScrollY : pos.top * that.scale;
1229
+ }
1230
+ } else if (that.options.snap) {
1231
+ that.pagesX = [];
1232
+ while (pos >= that.maxScrollX) {
1233
+ that.pagesX[page] = pos;
1234
+ pos = pos - that.wrapperW;
1235
+ page++;
1236
+ }
1237
+ if (that.maxScrollX % that.wrapperW)
1238
+ that.pagesX[that.pagesX.length] =
1239
+ that.maxScrollX -
1240
+ that.pagesX[that.pagesX.length - 1] +
1241
+ that.pagesX[that.pagesX.length - 1];
1242
+
1243
+ pos = 0;
1244
+ page = 0;
1245
+ that.pagesY = [];
1246
+ while (pos >= that.maxScrollY) {
1247
+ that.pagesY[page] = pos;
1248
+ pos = pos - that.wrapperH;
1249
+ page++;
1250
+ }
1251
+ if (that.maxScrollY % that.wrapperH)
1252
+ that.pagesY[that.pagesY.length] =
1253
+ that.maxScrollY -
1254
+ that.pagesY[that.pagesY.length - 1] +
1255
+ that.pagesY[that.pagesY.length - 1];
1256
+ }
972
1257
 
973
- if (!that.zoomed) {
974
- that.scroller.style[transitionDuration] = '0';
975
- that._resetPos(400);
976
- }
977
- },
1258
+ // Prepare the scrollbars
1259
+ that._scrollbar("h");
1260
+ that._scrollbar("v");
978
1261
 
979
- scrollTo: function (x, y, time, relative) {
980
- var that = this,
981
- step = x,
982
- i, l;
1262
+ if (!that.zoomed) {
1263
+ that.scroller.style[transitionDuration] = "0";
1264
+ that._resetPos(400);
1265
+ }
1266
+ },
983
1267
 
984
- that.stop();
1268
+ scrollTo(x, y, time, relative) {
1269
+ var that = this,
1270
+ step = x,
1271
+ i,
1272
+ l;
985
1273
 
986
- if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }];
987
-
988
- for (i=0, l=step.length; i<l; i++) {
989
- if (step[i].relative) { step[i].x = that.x - step[i].x; step[i].y = that.y - step[i].y; }
990
- that.steps.push({ x: step[i].x, y: step[i].y, time: step[i].time || 0 });
991
- }
1274
+ that.stop();
992
1275
 
993
- that._startAni();
994
- },
1276
+ if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }];
995
1277
 
996
- scrollToElement: function (el, time) {
997
- var that = this, pos;
998
- el = el.nodeType ? el : that.scroller.querySelector(el);
999
- if (!el) return;
1278
+ for (i = 0, l = step.length; i < l; i++) {
1279
+ if (step[i].relative) {
1280
+ step[i].x = that.x - step[i].x;
1281
+ step[i].y = that.y - step[i].y;
1282
+ }
1283
+ that.steps.push({
1284
+ x: step[i].x,
1285
+ y: step[i].y,
1286
+ time: step[i].time || 0
1287
+ });
1288
+ }
1000
1289
 
1001
- pos = that._offset(el);
1002
- pos.left += that.wrapperOffsetLeft;
1003
- pos.top += that.wrapperOffsetTop;
1290
+ that._startAni();
1291
+ },
1292
+
1293
+ scrollToElement(el, time) {
1294
+ var that = this,
1295
+ pos;
1296
+ el = el.nodeType ? el : that.scroller.querySelector(el);
1297
+ if (!el) return;
1298
+
1299
+ pos = that._offset(el);
1300
+ pos.left += that.wrapperOffsetLeft;
1301
+ pos.top += that.wrapperOffsetTop;
1302
+
1303
+ pos.left =
1304
+ pos.left > 0
1305
+ ? 0
1306
+ : pos.left < that.maxScrollX
1307
+ ? that.maxScrollX
1308
+ : pos.left;
1309
+ pos.top =
1310
+ pos.top > that.minScrollY
1311
+ ? that.minScrollY
1312
+ : pos.top < that.maxScrollY
1313
+ ? that.maxScrollY
1314
+ : pos.top;
1315
+ time =
1316
+ time === undefined
1317
+ ? m.max(m.abs(pos.left) * 2, m.abs(pos.top) * 2)
1318
+ : time;
1319
+
1320
+ that.scrollTo(pos.left, pos.top, time);
1321
+ },
1322
+
1323
+ scrollToPage(pageX, pageY, time) {
1324
+ var that = this,
1325
+ x,
1326
+ y;
1327
+
1328
+ time = time === undefined ? 400 : time;
1329
+
1330
+ if (that.options.onScrollStart) that.options.onScrollStart.call(that);
1004
1331
 
1005
- pos.left = pos.left > 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left;
1006
- pos.top = pos.top > that.minScrollY ? that.minScrollY : pos.top < that.maxScrollY ? that.maxScrollY : pos.top;
1007
- time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time;
1332
+ if (that.options.snap) {
1333
+ pageX =
1334
+ pageX == "next"
1335
+ ? that.currPageX + 1
1336
+ : pageX == "prev"
1337
+ ? that.currPageX - 1
1338
+ : pageX;
1339
+ pageY =
1340
+ pageY == "next"
1341
+ ? that.currPageY + 1
1342
+ : pageY == "prev"
1343
+ ? that.currPageY - 1
1344
+ : pageY;
1345
+
1346
+ pageX =
1347
+ pageX < 0
1348
+ ? 0
1349
+ : pageX > that.pagesX.length - 1
1350
+ ? that.pagesX.length - 1
1351
+ : pageX;
1352
+ pageY =
1353
+ pageY < 0
1354
+ ? 0
1355
+ : pageY > that.pagesY.length - 1
1356
+ ? that.pagesY.length - 1
1357
+ : pageY;
1358
+
1359
+ that.currPageX = pageX;
1360
+ that.currPageY = pageY;
1361
+ x = that.pagesX[pageX];
1362
+ y = that.pagesY[pageY];
1363
+ } else {
1364
+ x = -that.wrapperW * pageX;
1365
+ y = -that.wrapperH * pageY;
1366
+ if (x < that.maxScrollX) x = that.maxScrollX;
1367
+ if (y < that.maxScrollY) y = that.maxScrollY;
1368
+ }
1008
1369
 
1009
- that.scrollTo(pos.left, pos.top, time);
1010
- },
1370
+ that.scrollTo(x, y, time);
1371
+ },
1011
1372
 
1012
- scrollToPage: function (pageX, pageY, time) {
1013
- var that = this, x, y;
1014
-
1015
- time = time === undefined ? 400 : time;
1373
+ disable() {
1374
+ this.stop();
1375
+ this._resetPos(0);
1376
+ this.enabled = false;
1016
1377
 
1017
- if (that.options.onScrollStart) that.options.onScrollStart.call(that);
1378
+ // If disabled after touchstart we make sure that there are no left over events
1379
+ this._unbind(MOVE_EV, window);
1380
+ this._unbind(END_EV, window);
1381
+ this._unbind(CANCEL_EV, window);
1382
+ },
1018
1383
 
1019
- if (that.options.snap) {
1020
- pageX = pageX == 'next' ? that.currPageX+1 : pageX == 'prev' ? that.currPageX-1 : pageX;
1021
- pageY = pageY == 'next' ? that.currPageY+1 : pageY == 'prev' ? that.currPageY-1 : pageY;
1384
+ enable() {
1385
+ this.enabled = true;
1386
+ },
1022
1387
 
1023
- pageX = pageX < 0 ? 0 : pageX > that.pagesX.length-1 ? that.pagesX.length-1 : pageX;
1024
- pageY = pageY < 0 ? 0 : pageY > that.pagesY.length-1 ? that.pagesY.length-1 : pageY;
1388
+ stop() {
1389
+ if (this.options.useTransition) this._unbind(TRNEND_EV);
1390
+ else cancelFrame(this.aniTime);
1391
+ this.steps = [];
1392
+ this.moved = false;
1393
+ this.animating = false;
1394
+ },
1025
1395
 
1026
- that.currPageX = pageX;
1027
- that.currPageY = pageY;
1028
- x = that.pagesX[pageX];
1029
- y = that.pagesY[pageY];
1030
- } else {
1031
- x = -that.wrapperW * pageX;
1032
- y = -that.wrapperH * pageY;
1033
- if (x < that.maxScrollX) x = that.maxScrollX;
1034
- if (y < that.maxScrollY) y = that.maxScrollY;
1035
- }
1396
+ zoom(x, y, scale, time) {
1397
+ var that = this,
1398
+ relScale = scale / that.scale;
1036
1399
 
1037
- that.scrollTo(x, y, time);
1038
- },
1039
-
1040
- disable: function () {
1041
- this.stop();
1042
- this._resetPos(0);
1043
- this.enabled = false;
1044
-
1045
- // If disabled after touchstart we make sure that there are no left over events
1046
- this._unbind(MOVE_EV, window);
1047
- this._unbind(END_EV, window);
1048
- this._unbind(CANCEL_EV, window);
1049
- },
1050
-
1051
- enable: function () {
1052
- this.enabled = true;
1053
- },
1054
-
1055
- stop: function () {
1056
- if (this.options.useTransition) this._unbind(TRNEND_EV);
1057
- else cancelFrame(this.aniTime);
1058
- this.steps = [];
1059
- this.moved = false;
1060
- this.animating = false;
1061
- },
1062
-
1063
- zoom: function (x, y, scale, time) {
1064
- var that = this,
1065
- relScale = scale / that.scale;
1066
-
1067
- if (!that.options.useTransform) return;
1068
-
1069
- that.zoomed = true;
1070
- time = time === undefined ? 200 : time;
1071
- x = x - that.wrapperOffsetLeft - that.x;
1072
- y = y - that.wrapperOffsetTop - that.y;
1073
- that.x = x - x * relScale + that.x;
1074
- that.y = y - y * relScale + that.y;
1075
-
1076
- that.scale = scale;
1077
- that.refresh();
1078
-
1079
- that.x = that.x > 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x;
1080
- that.y = that.y > that.minScrollY ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y;
1081
-
1082
- that.scroller.style[transitionDuration] = time + 'ms';
1083
- that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + scale + ')' + translateZ;
1084
- that.zoomed = false;
1085
- },
1086
-
1087
- isReady: function () {
1088
- return !this.moved && !this.zoomed && !this.animating;
1089
- }
1090
- };
1400
+ if (!that.options.useTransform) return;
1091
1401
 
1092
- function prefixStyle (style) {
1093
- if ( vendor === '' ) return style;
1402
+ that.zoomed = true;
1403
+ time = time === undefined ? 200 : time;
1404
+ x = x - that.wrapperOffsetLeft - that.x;
1405
+ y = y - that.wrapperOffsetTop - that.y;
1406
+ that.x = x - x * relScale + that.x;
1407
+ that.y = y - y * relScale + that.y;
1408
+
1409
+ that.scale = scale;
1410
+ that.refresh();
1411
+
1412
+ that.x =
1413
+ that.x > 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x;
1414
+ that.y =
1415
+ that.y > that.minScrollY
1416
+ ? that.minScrollY
1417
+ : that.y < that.maxScrollY
1418
+ ? that.maxScrollY
1419
+ : that.y;
1420
+
1421
+ that.scroller.style[transitionDuration] = time + "ms";
1422
+ that.scroller.style[transform] =
1423
+ "translate(" +
1424
+ that.x +
1425
+ "px," +
1426
+ that.y +
1427
+ "px) scale(" +
1428
+ scale +
1429
+ ")" +
1430
+ translateZ;
1431
+ that.zoomed = false;
1432
+ },
1094
1433
 
1095
- style = style.charAt(0).toUpperCase() + style.substr(1);
1096
- return vendor + style;
1097
- }
1434
+ isReady() {
1435
+ return !this.moved && !this.zoomed && !this.animating;
1436
+ }
1437
+ };
1098
1438
 
1099
- dummyStyle = null; // for the sake of it
1439
+ function prefixStyle(style) {
1440
+ if (vendor === "") return style;
1441
+
1442
+ style = style.charAt(0).toUpperCase() + style.substr(1);
1443
+ return vendor + style;
1444
+ }
1100
1445
 
1101
- if (typeof exports !== 'undefined') exports.iScroll = iScroll;
1102
- else window.iScroll = iScroll;
1446
+ dummyStyle = null; // for the sake of it
1103
1447
 
1448
+ if (typeof exports !== "undefined") exports.iScroll = iScroll;
1449
+ else window.iScroll = iScroll;
1104
1450
  })(window, document);