@macallumharvey/first-test-wet 2.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/WetButton.d.ts +1 -1
- package/dist/first-test-wet.cjs.development.js +5 -0
- package/dist/first-test-wet.cjs.development.js.map +1 -1
- package/dist/first-test-wet.cjs.production.min.js +1 -1
- package/dist/first-test-wet.cjs.production.min.js.map +1 -1
- package/dist/first-test-wet.esm.js +5 -1
- package/dist/first-test-wet.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/WetButton.tsx +1 -1
- package/src/WetModal.tsx +1 -0
- package/src/index.tsx +1 -0
- package/src/theme-wet-boew/assets/favicon-mobile.png +0 -0
- package/src/theme-wet-boew/assets/favicon.ico +0 -0
- package/src/theme-wet-boew/assets/logo.png +0 -0
- package/src/theme-wet-boew/assets/logo.svg +14 -0
- package/src/theme-wet-boew/css/ie8-theme.css +17370 -0
- package/src/theme-wet-boew/css/ie8-theme.min.css +193 -0
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.js → theme-wet-boew/css/ie8-wet-boew.css} +12 -10
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.min.js → theme-wet-boew/css/ie8-wet-boew.min.css} +7 -7
- package/src/theme-wet-boew/css/theme.css +11357 -0
- package/src/theme-wet-boew/css/theme.min.css +6 -0
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.js → theme-wet-boew/css/wet-boew.css} +12 -10
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.min.js → theme-wet-boew/css/wet-boew.min.css} +6 -7
- package/src/theme-wet-boew/payload.json +66 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/mediacontrols.html +32 -33
- package/src/wet-boew/assets/sprites_share.png +0 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/noscript.css +112 -112
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/noscript.min.css +5 -5
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datalist.css +32 -32
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datepicker.css +47 -47
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/details.css +28 -28
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/mathml.css +16 -16
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/meter.css +24 -24
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/progress.css +8 -8
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/slider.css +229 -229
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/additional-methods.js +1511 -1511
- package/src/wet-boew/js/deps/additional-methods.min.js +9 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/geomap-lib.js +3758 -3770
- package/src/wet-boew/js/deps/geomap-lib.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.dataTables.js +15345 -15733
- package/src/wet-boew/js/deps/jquery.dataTables.min.js +4 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.canvas.js +345 -345
- package/src/wet-boew/js/deps/jquery.flot.canvas.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.js +3168 -3168
- package/src/wet-boew/js/deps/jquery.flot.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.orderBars.js +282 -282
- package/src/wet-boew/js/deps/jquery.flot.orderBars.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.pie.js +820 -820
- package/src/wet-boew/js/deps/jquery.flot.pie.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.magnific-popup.js +2060 -2060
- package/src/wet-boew/js/deps/jquery.magnific-popup.min.js +4 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.validate.js +1660 -1660
- package/src/wet-boew/js/deps/jquery.validate.min.js +9 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/json-patch.js +314 -314
- package/src/wet-boew/js/deps/json-patch.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jsonpointer.js +349 -349
- package/src/wet-boew/js/deps/jsonpointer.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-apollo.js +53 -53
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-basic.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-clj.js +64 -64
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-css.js +160 -160
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-dart.js +92 -92
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-erlang.js +94 -94
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-go.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-hs.js +102 -102
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lasso.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lisp.js +95 -95
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-llvm.js +63 -63
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-logtalk.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lua.js +60 -60
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-matlab.js +183 -183
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-matlab.min.js +1 -1
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-ml.js +57 -57
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-mumps.js +140 -140
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-n.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-pascal.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-proto.js +37 -37
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-r.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rd.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rust.js +81 -81
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-scala.js +56 -56
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-sql.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-swift.js +60 -60
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tcl.js +63 -63
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tex.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vb.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vhdl.js +51 -51
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-wiki.js +55 -55
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-xq.js +71 -71
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-yaml.js +45 -45
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/ol.js +1008 -1008
- package/src/wet-boew/js/deps/ol.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/prettify.js +1742 -1742
- package/src/wet-boew/js/deps/prettify.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/proj4.js +2 -2
- package/src/wet-boew/js/deps/proj4.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/run_prettify.js +1998 -1998
- package/src/wet-boew/js/deps/run_prettify.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/tableparser.js +2216 -2216
- package/src/wet-boew/js/deps/tableparser.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/unorm.js +452 -452
- package/src/wet-boew/js/deps/unorm.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/af.js +246 -254
- package/src/wet-boew/js/i18n/af.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ar.js +284 -292
- package/src/wet-boew/js/i18n/ar.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/bg.js +284 -292
- package/src/wet-boew/js/i18n/bg.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/cs.js +285 -293
- package/src/wet-boew/js/i18n/cs.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/de.js +354 -362
- package/src/wet-boew/js/i18n/de.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/el.js +284 -292
- package/src/wet-boew/js/i18n/el.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/en.js +246 -254
- package/src/wet-boew/js/i18n/en.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/es.js +287 -295
- package/src/wet-boew/js/i18n/es.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/et.js +282 -290
- package/src/wet-boew/js/i18n/et.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/fr.js +313 -321
- package/src/wet-boew/js/i18n/fr.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hi.js +246 -254
- package/src/wet-boew/js/i18n/hi.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hu.js +284 -292
- package/src/wet-boew/js/i18n/hu.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hy.js +246 -254
- package/src/wet-boew/js/i18n/hy.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/id.js +283 -291
- package/src/wet-boew/js/i18n/id.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/is.js +282 -290
- package/src/wet-boew/js/i18n/is.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/it.js +311 -319
- package/src/wet-boew/js/i18n/it.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/iu.js +246 -254
- package/src/wet-boew/js/i18n/iu.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ja.js +285 -293
- package/src/wet-boew/js/i18n/ja.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ko.js +284 -292
- package/src/wet-boew/js/i18n/ko.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/lt.js +284 -292
- package/src/wet-boew/js/i18n/lt.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/lv.js +284 -292
- package/src/wet-boew/js/i18n/lv.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/nl.js +318 -326
- package/src/wet-boew/js/i18n/nl.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pl.js +287 -295
- package/src/wet-boew/js/i18n/pl.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pt-BR.js +246 -254
- package/src/wet-boew/js/i18n/pt-BR.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pt.js +270 -278
- package/src/wet-boew/js/i18n/pt.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ru.js +284 -292
- package/src/wet-boew/js/i18n/ru.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/sk.js +282 -290
- package/src/wet-boew/js/i18n/sk.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/sq.js +246 -254
- package/src/wet-boew/js/i18n/sq.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/th.js +284 -292
- package/src/wet-boew/js/i18n/th.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/tr.js +286 -294
- package/src/wet-boew/js/i18n/tr.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/uk.js +284 -292
- package/src/wet-boew/js/i18n/uk.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/vi.js +284 -292
- package/src/wet-boew/js/i18n/vi.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/zh-Hans.js +246 -254
- package/src/wet-boew/js/i18n/zh-Hans.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/zh.js +285 -293
- package/src/wet-boew/js/i18n/zh.min.js +7 -0
- package/src/wet-boew/js/ie8-wet-boew.js +3992 -0
- package/src/wet-boew/js/ie8-wet-boew.min.js +7 -0
- package/src/wet-boew/js/ie8-wet-boew2.js +15294 -0
- package/src/wet-boew/js/ie8-wet-boew2.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.js +9814 -9814
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.min.js +4 -4
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist.js +423 -419
- package/src/wet-boew/js/polyfills/datalist.min.js +8 -0
- package/src/wet-boew/js/polyfills/datalist.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist_dynamic.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist_dynamic.min.js +7 -7
- package/src/wet-boew/js/polyfills/datalist_dynamic.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datepicker.js +338 -338
- package/src/wet-boew/js/polyfills/datepicker.min.js +8 -0
- package/src/wet-boew/js/polyfills/datepicker.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/details.js +126 -126
- package/src/wet-boew/js/polyfills/details.min.js +8 -0
- package/src/wet-boew/js/polyfills/details.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/jawsariafixes.js +47 -47
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/jawsariafixes.min.js +15 -15
- package/src/wet-boew/js/polyfills/jawsariafixes.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/meter.js +140 -140
- package/src/wet-boew/js/polyfills/meter.min.js +8 -0
- package/src/wet-boew/js/polyfills/meter.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/mobile.js +783 -784
- package/src/wet-boew/js/polyfills/mobile.min.js +8 -0
- package/src/wet-boew/js/polyfills/mobile.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/progress.js +107 -107
- package/src/wet-boew/js/polyfills/progress.min.js +8 -0
- package/src/wet-boew/js/polyfills/progress.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider.js +1343 -1343
- package/src/wet-boew/js/polyfills/slider.min.js +9 -0
- package/src/wet-boew/js/polyfills/slider.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider_wrapper.js +73 -73
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider_wrapper.min.js +7 -7
- package/src/wet-boew/js/polyfills/slider_wrapper.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/svg.js +29 -29
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/svg.min.js +7 -7
- package/src/wet-boew/js/polyfills/svg.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/test.js +603 -603
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/test.min.js +7 -7
- package/src/wet-boew/js/polyfills/test.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/wet-boew.js +17714 -20264
- package/src/wet-boew/js/wet-boew.min.js +9 -0
- package/src/wet-boew/js/wet-boew.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/payload.json +1721 -1721
- package/src/wet-boew-cdn-4.0.81.1/Licence-fr.txt +0 -1
- package/src/wet-boew-cdn-4.0.81.1/License-en.txt +0 -1
- package/src/wet-boew-cdn-4.0.81.1/assets/sprites_share.png +0 -0
- package/src/wet-boew-cdn-4.0.81.1/js/deps/additional-methods.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/deps/geomap-lib.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.dataTables.min.js +0 -4
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.canvas.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.orderBars.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.pie.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.magnific-popup.min.js +0 -4
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.validate.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/deps/json-patch.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jsonpointer.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/ol.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/prettify.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/proj4.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/run_prettify.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/tableparser.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/unorm.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/af.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ar.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/bg.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/cs.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/de.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/el.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/en.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/es.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/et.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/fr.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hi.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hu.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hy.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/id.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/is.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/it.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/iu.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ja.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ko.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/lt.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/lv.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/nl.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pl.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pt-BR.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pt.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ru.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/sk.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/sq.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/th.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/tr.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/uk.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/vi.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/zh-Hans.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/zh.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist_dynamic.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datepicker.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datepicker.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/details.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/details.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/jawsariafixes.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/meter.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/meter.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/mobile.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/mobile.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/progress.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/progress.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider_wrapper.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/svg.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/test.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/wet-boew.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/wet-boew.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/package.json +0 -15
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/cloud-popup-relative.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/fd-slider-sprite.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/loading.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-minus-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-plus-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-world-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datalist.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datepicker.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/details.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/mathml.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/meter.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/progress.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/slider.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.eot +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.ttf +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.woff2 +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/mml-chtml.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-apollo.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-basic.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-clj.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-css.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-dart.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-erlang.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-go.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-hs.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lasso.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lisp.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-llvm.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-logtalk.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lua.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-ml.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-mumps.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-n.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-pascal.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-proto.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-r.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rd.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rust.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-scala.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-sql.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-swift.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tcl.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tex.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vb.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vhdl.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-wiki.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-xq.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-yaml.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.min.map +0 -0
@@ -1,345 +1,345 @@
|
|
1
|
-
/* Flot plugin for drawing all elements of a plot on the canvas.
|
2
|
-
|
3
|
-
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
4
|
-
Licensed under the MIT license.
|
5
|
-
|
6
|
-
Flot normally produces certain elements, like axis labels and the legend, using
|
7
|
-
HTML elements. This permits greater interactivity and customization, and often
|
8
|
-
looks better, due to cross-browser canvas text inconsistencies and limitations.
|
9
|
-
|
10
|
-
It can also be desirable to render the plot entirely in canvas, particularly
|
11
|
-
if the goal is to save it as an image, or if Flot is being used in a context
|
12
|
-
where the HTML DOM does not exist, as is the case within Node.js. This plugin
|
13
|
-
switches out Flot's standard drawing operations for canvas-only replacements.
|
14
|
-
|
15
|
-
Currently the plugin supports only axis labels, but it will eventually allow
|
16
|
-
every element of the plot to be rendered directly to canvas.
|
17
|
-
|
18
|
-
The plugin supports these options:
|
19
|
-
|
20
|
-
{
|
21
|
-
canvas: boolean
|
22
|
-
}
|
23
|
-
|
24
|
-
The "canvas" option controls whether full canvas drawing is enabled, making it
|
25
|
-
possible to toggle on and off. This is useful when a plot uses HTML text in the
|
26
|
-
browser, but needs to redraw with canvas text when exporting as an image.
|
27
|
-
|
28
|
-
*/
|
29
|
-
|
30
|
-
(function($) {
|
31
|
-
|
32
|
-
var options = {
|
33
|
-
canvas: true
|
34
|
-
};
|
35
|
-
|
36
|
-
var render, getTextInfo, addText;
|
37
|
-
|
38
|
-
// Cache the prototype hasOwnProperty for faster access
|
39
|
-
|
40
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
41
|
-
|
42
|
-
function init(plot, classes) {
|
43
|
-
|
44
|
-
var Canvas = classes.Canvas;
|
45
|
-
|
46
|
-
// We only want to replace the functions once; the second time around
|
47
|
-
// we would just get our new function back. This whole replacing of
|
48
|
-
// prototype functions is a disaster, and needs to be changed ASAP.
|
49
|
-
|
50
|
-
if (render == null) {
|
51
|
-
getTextInfo = Canvas.prototype.getTextInfo,
|
52
|
-
addText = Canvas.prototype.addText,
|
53
|
-
render = Canvas.prototype.render;
|
54
|
-
}
|
55
|
-
|
56
|
-
// Finishes rendering the canvas, including overlaid text
|
57
|
-
|
58
|
-
Canvas.prototype.render = function() {
|
59
|
-
|
60
|
-
if (!plot.getOptions().canvas) {
|
61
|
-
return render.call(this);
|
62
|
-
}
|
63
|
-
|
64
|
-
var context = this.context,
|
65
|
-
cache = this._textCache;
|
66
|
-
|
67
|
-
// For each text layer, render elements marked as active
|
68
|
-
|
69
|
-
context.save();
|
70
|
-
context.textBaseline = "middle";
|
71
|
-
|
72
|
-
for (var layerKey in cache) {
|
73
|
-
if (hasOwnProperty.call(cache, layerKey)) {
|
74
|
-
var layerCache = cache[layerKey];
|
75
|
-
for (var styleKey in layerCache) {
|
76
|
-
if (hasOwnProperty.call(layerCache, styleKey)) {
|
77
|
-
var styleCache = layerCache[styleKey],
|
78
|
-
updateStyles = true;
|
79
|
-
for (var key in styleCache) {
|
80
|
-
if (hasOwnProperty.call(styleCache, key)) {
|
81
|
-
|
82
|
-
var info = styleCache[key],
|
83
|
-
positions = info.positions,
|
84
|
-
lines = info.lines;
|
85
|
-
|
86
|
-
// Since every element at this level of the cache have the
|
87
|
-
// same font and fill styles, we can just change them once
|
88
|
-
// using the values from the first element.
|
89
|
-
|
90
|
-
if (updateStyles) {
|
91
|
-
context.fillStyle = info.font.color;
|
92
|
-
context.font = info.font.definition;
|
93
|
-
updateStyles = false;
|
94
|
-
}
|
95
|
-
|
96
|
-
for (var i = 0, position; position = positions[i]; i++) {
|
97
|
-
if (position.active) {
|
98
|
-
for (var j = 0, line; line = position.lines[j]; j++) {
|
99
|
-
context.fillText(lines[j].text, line[0], line[1]);
|
100
|
-
}
|
101
|
-
} else {
|
102
|
-
positions.splice(i--, 1);
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
if (positions.length == 0) {
|
107
|
-
delete styleCache[key];
|
108
|
-
}
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
context.restore();
|
117
|
-
};
|
118
|
-
|
119
|
-
// Creates (if necessary) and returns a text info object.
|
120
|
-
//
|
121
|
-
// When the canvas option is set, the object looks like this:
|
122
|
-
//
|
123
|
-
// {
|
124
|
-
// width: Width of the text's bounding box.
|
125
|
-
// height: Height of the text's bounding box.
|
126
|
-
// positions: Array of positions at which this text is drawn.
|
127
|
-
// lines: [{
|
128
|
-
// height: Height of this line.
|
129
|
-
// widths: Width of this line.
|
130
|
-
// text: Text on this line.
|
131
|
-
// }],
|
132
|
-
// font: {
|
133
|
-
// definition: Canvas font property string.
|
134
|
-
// color: Color of the text.
|
135
|
-
// },
|
136
|
-
// }
|
137
|
-
//
|
138
|
-
// The positions array contains objects that look like this:
|
139
|
-
//
|
140
|
-
// {
|
141
|
-
// active: Flag indicating whether the text should be visible.
|
142
|
-
// lines: Array of [x, y] coordinates at which to draw the line.
|
143
|
-
// x: X coordinate at which to draw the text.
|
144
|
-
// y: Y coordinate at which to draw the text.
|
145
|
-
// }
|
146
|
-
|
147
|
-
Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
|
148
|
-
|
149
|
-
if (!plot.getOptions().canvas) {
|
150
|
-
return getTextInfo.call(this, layer, text, font, angle, width);
|
151
|
-
}
|
152
|
-
|
153
|
-
var textStyle, layerCache, styleCache, info;
|
154
|
-
|
155
|
-
// Cast the value to a string, in case we were given a number
|
156
|
-
|
157
|
-
text = "" + text;
|
158
|
-
|
159
|
-
// If the font is a font-spec object, generate a CSS definition
|
160
|
-
|
161
|
-
if (typeof font === "object") {
|
162
|
-
textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px " + font.family;
|
163
|
-
} else {
|
164
|
-
textStyle = font;
|
165
|
-
}
|
166
|
-
|
167
|
-
// Retrieve (or create) the cache for the text's layer and styles
|
168
|
-
|
169
|
-
layerCache = this._textCache[layer];
|
170
|
-
|
171
|
-
if (layerCache == null) {
|
172
|
-
layerCache = this._textCache[layer] = {};
|
173
|
-
}
|
174
|
-
|
175
|
-
styleCache = layerCache[textStyle];
|
176
|
-
|
177
|
-
if (styleCache == null) {
|
178
|
-
styleCache = layerCache[textStyle] = {};
|
179
|
-
}
|
180
|
-
|
181
|
-
info = styleCache[text];
|
182
|
-
|
183
|
-
if (info == null) {
|
184
|
-
|
185
|
-
var context = this.context;
|
186
|
-
|
187
|
-
// If the font was provided as CSS, create a div with those
|
188
|
-
// classes and examine it to generate a canvas font spec.
|
189
|
-
|
190
|
-
if (typeof font !== "object") {
|
191
|
-
|
192
|
-
var element = $("<div> </div>")
|
193
|
-
.css("position", "absolute")
|
194
|
-
.addClass(typeof font === "string" ? font : null)
|
195
|
-
.appendTo(this.getTextLayer(layer));
|
196
|
-
|
197
|
-
font = {
|
198
|
-
lineHeight: element.height(),
|
199
|
-
style: element.css("font-style"),
|
200
|
-
variant: element.css("font-variant"),
|
201
|
-
weight: element.css("font-weight"),
|
202
|
-
family: element.css("font-family"),
|
203
|
-
color: element.css("color")
|
204
|
-
};
|
205
|
-
|
206
|
-
// Setting line-height to 1, without units, sets it equal
|
207
|
-
// to the font-size, even if the font-size is abstract,
|
208
|
-
// like 'smaller'. This enables us to read the real size
|
209
|
-
// via the element's height, working around browsers that
|
210
|
-
// return the literal 'smaller' value.
|
211
|
-
|
212
|
-
font.size = element.css("line-height", 1).height();
|
213
|
-
|
214
|
-
element.remove();
|
215
|
-
}
|
216
|
-
|
217
|
-
textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px " + font.family;
|
218
|
-
|
219
|
-
// Create a new info object, initializing the dimensions to
|
220
|
-
// zero so we can count them up line-by-line.
|
221
|
-
|
222
|
-
info = styleCache[text] = {
|
223
|
-
width: 0,
|
224
|
-
height: 0,
|
225
|
-
positions: [],
|
226
|
-
lines: [],
|
227
|
-
font: {
|
228
|
-
definition: textStyle,
|
229
|
-
color: font.color
|
230
|
-
}
|
231
|
-
};
|
232
|
-
|
233
|
-
context.save();
|
234
|
-
context.font = textStyle;
|
235
|
-
|
236
|
-
// Canvas can't handle multi-line strings; break on various
|
237
|
-
// newlines, including HTML brs, to build a list of lines.
|
238
|
-
// Note that we could split directly on regexps, but IE < 9 is
|
239
|
-
// broken; revisit when we drop IE 7/8 support.
|
240
|
-
|
241
|
-
var lines = (text + "").replace(/<br ?\/?>|\r\n|\r/g, "\n").split("\n");
|
242
|
-
|
243
|
-
for (var i = 0; i < lines.length; ++i) {
|
244
|
-
|
245
|
-
var lineText = lines[i],
|
246
|
-
measured = context.measureText(lineText);
|
247
|
-
|
248
|
-
info.width = Math.max(measured.width, info.width);
|
249
|
-
info.height += font.lineHeight;
|
250
|
-
|
251
|
-
info.lines.push({
|
252
|
-
text: lineText,
|
253
|
-
width: measured.width,
|
254
|
-
height: font.lineHeight
|
255
|
-
});
|
256
|
-
}
|
257
|
-
|
258
|
-
context.restore();
|
259
|
-
}
|
260
|
-
|
261
|
-
return info;
|
262
|
-
};
|
263
|
-
|
264
|
-
// Adds a text string to the canvas text overlay.
|
265
|
-
|
266
|
-
Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
|
267
|
-
|
268
|
-
if (!plot.getOptions().canvas) {
|
269
|
-
return addText.call(this, layer, x, y, text, font, angle, width, halign, valign);
|
270
|
-
}
|
271
|
-
|
272
|
-
var info = this.getTextInfo(layer, text, font, angle, width),
|
273
|
-
positions = info.positions,
|
274
|
-
lines = info.lines;
|
275
|
-
|
276
|
-
// Text is drawn with baseline 'middle', which we need to account
|
277
|
-
// for by adding half a line's height to the y position.
|
278
|
-
|
279
|
-
y += info.height / lines.length / 2;
|
280
|
-
|
281
|
-
// Tweak the initial y-position to match vertical alignment
|
282
|
-
|
283
|
-
if (valign == "middle") {
|
284
|
-
y = Math.round(y - info.height / 2);
|
285
|
-
} else if (valign == "bottom") {
|
286
|
-
y = Math.round(y - info.height);
|
287
|
-
} else {
|
288
|
-
y = Math.round(y);
|
289
|
-
}
|
290
|
-
|
291
|
-
// FIXME: LEGACY BROWSER FIX
|
292
|
-
// AFFECTS: Opera < 12.00
|
293
|
-
|
294
|
-
// Offset the y coordinate, since Opera is off pretty
|
295
|
-
// consistently compared to the other browsers.
|
296
|
-
|
297
|
-
if (!!(window.opera && window.opera.version().split(".")[0] < 12)) {
|
298
|
-
y -= 2;
|
299
|
-
}
|
300
|
-
|
301
|
-
// Determine whether this text already exists at this position.
|
302
|
-
// If so, mark it for inclusion in the next render pass.
|
303
|
-
|
304
|
-
for (var i = 0, position; position = positions[i]; i++) {
|
305
|
-
if (position.x == x && position.y == y) {
|
306
|
-
position.active = true;
|
307
|
-
return;
|
308
|
-
}
|
309
|
-
}
|
310
|
-
|
311
|
-
// If the text doesn't exist at this position, create a new entry
|
312
|
-
|
313
|
-
position = {
|
314
|
-
active: true,
|
315
|
-
lines: [],
|
316
|
-
x: x,
|
317
|
-
y: y
|
318
|
-
};
|
319
|
-
|
320
|
-
positions.push(position);
|
321
|
-
|
322
|
-
// Fill in the x & y positions of each line, adjusting them
|
323
|
-
// individually for horizontal alignment.
|
324
|
-
|
325
|
-
for (var i = 0, line; line = lines[i]; i++) {
|
326
|
-
if (halign == "center") {
|
327
|
-
position.lines.push([Math.round(x - line.width / 2), y]);
|
328
|
-
} else if (halign == "right") {
|
329
|
-
position.lines.push([Math.round(x - line.width), y]);
|
330
|
-
} else {
|
331
|
-
position.lines.push([Math.round(x), y]);
|
332
|
-
}
|
333
|
-
y += line.height;
|
334
|
-
}
|
335
|
-
};
|
336
|
-
}
|
337
|
-
|
338
|
-
$.plot.plugins.push({
|
339
|
-
init: init,
|
340
|
-
options: options,
|
341
|
-
name: "canvas",
|
342
|
-
version: "1.0"
|
343
|
-
});
|
344
|
-
|
345
|
-
})(jQuery);
|
1
|
+
/* Flot plugin for drawing all elements of a plot on the canvas.
|
2
|
+
|
3
|
+
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
4
|
+
Licensed under the MIT license.
|
5
|
+
|
6
|
+
Flot normally produces certain elements, like axis labels and the legend, using
|
7
|
+
HTML elements. This permits greater interactivity and customization, and often
|
8
|
+
looks better, due to cross-browser canvas text inconsistencies and limitations.
|
9
|
+
|
10
|
+
It can also be desirable to render the plot entirely in canvas, particularly
|
11
|
+
if the goal is to save it as an image, or if Flot is being used in a context
|
12
|
+
where the HTML DOM does not exist, as is the case within Node.js. This plugin
|
13
|
+
switches out Flot's standard drawing operations for canvas-only replacements.
|
14
|
+
|
15
|
+
Currently the plugin supports only axis labels, but it will eventually allow
|
16
|
+
every element of the plot to be rendered directly to canvas.
|
17
|
+
|
18
|
+
The plugin supports these options:
|
19
|
+
|
20
|
+
{
|
21
|
+
canvas: boolean
|
22
|
+
}
|
23
|
+
|
24
|
+
The "canvas" option controls whether full canvas drawing is enabled, making it
|
25
|
+
possible to toggle on and off. This is useful when a plot uses HTML text in the
|
26
|
+
browser, but needs to redraw with canvas text when exporting as an image.
|
27
|
+
|
28
|
+
*/
|
29
|
+
|
30
|
+
(function($) {
|
31
|
+
|
32
|
+
var options = {
|
33
|
+
canvas: true
|
34
|
+
};
|
35
|
+
|
36
|
+
var render, getTextInfo, addText;
|
37
|
+
|
38
|
+
// Cache the prototype hasOwnProperty for faster access
|
39
|
+
|
40
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
41
|
+
|
42
|
+
function init(plot, classes) {
|
43
|
+
|
44
|
+
var Canvas = classes.Canvas;
|
45
|
+
|
46
|
+
// We only want to replace the functions once; the second time around
|
47
|
+
// we would just get our new function back. This whole replacing of
|
48
|
+
// prototype functions is a disaster, and needs to be changed ASAP.
|
49
|
+
|
50
|
+
if (render == null) {
|
51
|
+
getTextInfo = Canvas.prototype.getTextInfo,
|
52
|
+
addText = Canvas.prototype.addText,
|
53
|
+
render = Canvas.prototype.render;
|
54
|
+
}
|
55
|
+
|
56
|
+
// Finishes rendering the canvas, including overlaid text
|
57
|
+
|
58
|
+
Canvas.prototype.render = function() {
|
59
|
+
|
60
|
+
if (!plot.getOptions().canvas) {
|
61
|
+
return render.call(this);
|
62
|
+
}
|
63
|
+
|
64
|
+
var context = this.context,
|
65
|
+
cache = this._textCache;
|
66
|
+
|
67
|
+
// For each text layer, render elements marked as active
|
68
|
+
|
69
|
+
context.save();
|
70
|
+
context.textBaseline = "middle";
|
71
|
+
|
72
|
+
for (var layerKey in cache) {
|
73
|
+
if (hasOwnProperty.call(cache, layerKey)) {
|
74
|
+
var layerCache = cache[layerKey];
|
75
|
+
for (var styleKey in layerCache) {
|
76
|
+
if (hasOwnProperty.call(layerCache, styleKey)) {
|
77
|
+
var styleCache = layerCache[styleKey],
|
78
|
+
updateStyles = true;
|
79
|
+
for (var key in styleCache) {
|
80
|
+
if (hasOwnProperty.call(styleCache, key)) {
|
81
|
+
|
82
|
+
var info = styleCache[key],
|
83
|
+
positions = info.positions,
|
84
|
+
lines = info.lines;
|
85
|
+
|
86
|
+
// Since every element at this level of the cache have the
|
87
|
+
// same font and fill styles, we can just change them once
|
88
|
+
// using the values from the first element.
|
89
|
+
|
90
|
+
if (updateStyles) {
|
91
|
+
context.fillStyle = info.font.color;
|
92
|
+
context.font = info.font.definition;
|
93
|
+
updateStyles = false;
|
94
|
+
}
|
95
|
+
|
96
|
+
for (var i = 0, position; position = positions[i]; i++) {
|
97
|
+
if (position.active) {
|
98
|
+
for (var j = 0, line; line = position.lines[j]; j++) {
|
99
|
+
context.fillText(lines[j].text, line[0], line[1]);
|
100
|
+
}
|
101
|
+
} else {
|
102
|
+
positions.splice(i--, 1);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
if (positions.length == 0) {
|
107
|
+
delete styleCache[key];
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
context.restore();
|
117
|
+
};
|
118
|
+
|
119
|
+
// Creates (if necessary) and returns a text info object.
|
120
|
+
//
|
121
|
+
// When the canvas option is set, the object looks like this:
|
122
|
+
//
|
123
|
+
// {
|
124
|
+
// width: Width of the text's bounding box.
|
125
|
+
// height: Height of the text's bounding box.
|
126
|
+
// positions: Array of positions at which this text is drawn.
|
127
|
+
// lines: [{
|
128
|
+
// height: Height of this line.
|
129
|
+
// widths: Width of this line.
|
130
|
+
// text: Text on this line.
|
131
|
+
// }],
|
132
|
+
// font: {
|
133
|
+
// definition: Canvas font property string.
|
134
|
+
// color: Color of the text.
|
135
|
+
// },
|
136
|
+
// }
|
137
|
+
//
|
138
|
+
// The positions array contains objects that look like this:
|
139
|
+
//
|
140
|
+
// {
|
141
|
+
// active: Flag indicating whether the text should be visible.
|
142
|
+
// lines: Array of [x, y] coordinates at which to draw the line.
|
143
|
+
// x: X coordinate at which to draw the text.
|
144
|
+
// y: Y coordinate at which to draw the text.
|
145
|
+
// }
|
146
|
+
|
147
|
+
Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
|
148
|
+
|
149
|
+
if (!plot.getOptions().canvas) {
|
150
|
+
return getTextInfo.call(this, layer, text, font, angle, width);
|
151
|
+
}
|
152
|
+
|
153
|
+
var textStyle, layerCache, styleCache, info;
|
154
|
+
|
155
|
+
// Cast the value to a string, in case we were given a number
|
156
|
+
|
157
|
+
text = "" + text;
|
158
|
+
|
159
|
+
// If the font is a font-spec object, generate a CSS definition
|
160
|
+
|
161
|
+
if (typeof font === "object") {
|
162
|
+
textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px " + font.family;
|
163
|
+
} else {
|
164
|
+
textStyle = font;
|
165
|
+
}
|
166
|
+
|
167
|
+
// Retrieve (or create) the cache for the text's layer and styles
|
168
|
+
|
169
|
+
layerCache = this._textCache[layer];
|
170
|
+
|
171
|
+
if (layerCache == null) {
|
172
|
+
layerCache = this._textCache[layer] = {};
|
173
|
+
}
|
174
|
+
|
175
|
+
styleCache = layerCache[textStyle];
|
176
|
+
|
177
|
+
if (styleCache == null) {
|
178
|
+
styleCache = layerCache[textStyle] = {};
|
179
|
+
}
|
180
|
+
|
181
|
+
info = styleCache[text];
|
182
|
+
|
183
|
+
if (info == null) {
|
184
|
+
|
185
|
+
var context = this.context;
|
186
|
+
|
187
|
+
// If the font was provided as CSS, create a div with those
|
188
|
+
// classes and examine it to generate a canvas font spec.
|
189
|
+
|
190
|
+
if (typeof font !== "object") {
|
191
|
+
|
192
|
+
var element = $("<div> </div>")
|
193
|
+
.css("position", "absolute")
|
194
|
+
.addClass(typeof font === "string" ? font : null)
|
195
|
+
.appendTo(this.getTextLayer(layer));
|
196
|
+
|
197
|
+
font = {
|
198
|
+
lineHeight: element.height(),
|
199
|
+
style: element.css("font-style"),
|
200
|
+
variant: element.css("font-variant"),
|
201
|
+
weight: element.css("font-weight"),
|
202
|
+
family: element.css("font-family"),
|
203
|
+
color: element.css("color")
|
204
|
+
};
|
205
|
+
|
206
|
+
// Setting line-height to 1, without units, sets it equal
|
207
|
+
// to the font-size, even if the font-size is abstract,
|
208
|
+
// like 'smaller'. This enables us to read the real size
|
209
|
+
// via the element's height, working around browsers that
|
210
|
+
// return the literal 'smaller' value.
|
211
|
+
|
212
|
+
font.size = element.css("line-height", 1).height();
|
213
|
+
|
214
|
+
element.remove();
|
215
|
+
}
|
216
|
+
|
217
|
+
textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px " + font.family;
|
218
|
+
|
219
|
+
// Create a new info object, initializing the dimensions to
|
220
|
+
// zero so we can count them up line-by-line.
|
221
|
+
|
222
|
+
info = styleCache[text] = {
|
223
|
+
width: 0,
|
224
|
+
height: 0,
|
225
|
+
positions: [],
|
226
|
+
lines: [],
|
227
|
+
font: {
|
228
|
+
definition: textStyle,
|
229
|
+
color: font.color
|
230
|
+
}
|
231
|
+
};
|
232
|
+
|
233
|
+
context.save();
|
234
|
+
context.font = textStyle;
|
235
|
+
|
236
|
+
// Canvas can't handle multi-line strings; break on various
|
237
|
+
// newlines, including HTML brs, to build a list of lines.
|
238
|
+
// Note that we could split directly on regexps, but IE < 9 is
|
239
|
+
// broken; revisit when we drop IE 7/8 support.
|
240
|
+
|
241
|
+
var lines = (text + "").replace(/<br ?\/?>|\r\n|\r/g, "\n").split("\n");
|
242
|
+
|
243
|
+
for (var i = 0; i < lines.length; ++i) {
|
244
|
+
|
245
|
+
var lineText = lines[i],
|
246
|
+
measured = context.measureText(lineText);
|
247
|
+
|
248
|
+
info.width = Math.max(measured.width, info.width);
|
249
|
+
info.height += font.lineHeight;
|
250
|
+
|
251
|
+
info.lines.push({
|
252
|
+
text: lineText,
|
253
|
+
width: measured.width,
|
254
|
+
height: font.lineHeight
|
255
|
+
});
|
256
|
+
}
|
257
|
+
|
258
|
+
context.restore();
|
259
|
+
}
|
260
|
+
|
261
|
+
return info;
|
262
|
+
};
|
263
|
+
|
264
|
+
// Adds a text string to the canvas text overlay.
|
265
|
+
|
266
|
+
Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
|
267
|
+
|
268
|
+
if (!plot.getOptions().canvas) {
|
269
|
+
return addText.call(this, layer, x, y, text, font, angle, width, halign, valign);
|
270
|
+
}
|
271
|
+
|
272
|
+
var info = this.getTextInfo(layer, text, font, angle, width),
|
273
|
+
positions = info.positions,
|
274
|
+
lines = info.lines;
|
275
|
+
|
276
|
+
// Text is drawn with baseline 'middle', which we need to account
|
277
|
+
// for by adding half a line's height to the y position.
|
278
|
+
|
279
|
+
y += info.height / lines.length / 2;
|
280
|
+
|
281
|
+
// Tweak the initial y-position to match vertical alignment
|
282
|
+
|
283
|
+
if (valign == "middle") {
|
284
|
+
y = Math.round(y - info.height / 2);
|
285
|
+
} else if (valign == "bottom") {
|
286
|
+
y = Math.round(y - info.height);
|
287
|
+
} else {
|
288
|
+
y = Math.round(y);
|
289
|
+
}
|
290
|
+
|
291
|
+
// FIXME: LEGACY BROWSER FIX
|
292
|
+
// AFFECTS: Opera < 12.00
|
293
|
+
|
294
|
+
// Offset the y coordinate, since Opera is off pretty
|
295
|
+
// consistently compared to the other browsers.
|
296
|
+
|
297
|
+
if (!!(window.opera && window.opera.version().split(".")[0] < 12)) {
|
298
|
+
y -= 2;
|
299
|
+
}
|
300
|
+
|
301
|
+
// Determine whether this text already exists at this position.
|
302
|
+
// If so, mark it for inclusion in the next render pass.
|
303
|
+
|
304
|
+
for (var i = 0, position; position = positions[i]; i++) {
|
305
|
+
if (position.x == x && position.y == y) {
|
306
|
+
position.active = true;
|
307
|
+
return;
|
308
|
+
}
|
309
|
+
}
|
310
|
+
|
311
|
+
// If the text doesn't exist at this position, create a new entry
|
312
|
+
|
313
|
+
position = {
|
314
|
+
active: true,
|
315
|
+
lines: [],
|
316
|
+
x: x,
|
317
|
+
y: y
|
318
|
+
};
|
319
|
+
|
320
|
+
positions.push(position);
|
321
|
+
|
322
|
+
// Fill in the x & y positions of each line, adjusting them
|
323
|
+
// individually for horizontal alignment.
|
324
|
+
|
325
|
+
for (var i = 0, line; line = lines[i]; i++) {
|
326
|
+
if (halign == "center") {
|
327
|
+
position.lines.push([Math.round(x - line.width / 2), y]);
|
328
|
+
} else if (halign == "right") {
|
329
|
+
position.lines.push([Math.round(x - line.width), y]);
|
330
|
+
} else {
|
331
|
+
position.lines.push([Math.round(x), y]);
|
332
|
+
}
|
333
|
+
y += line.height;
|
334
|
+
}
|
335
|
+
};
|
336
|
+
}
|
337
|
+
|
338
|
+
$.plot.plugins.push({
|
339
|
+
init: init,
|
340
|
+
options: options,
|
341
|
+
name: "canvas",
|
342
|
+
version: "1.0"
|
343
|
+
});
|
344
|
+
|
345
|
+
})(jQuery);
|