Compare commits
298 Commits
v1.0.4
...
obersalzberg
| Author | SHA1 | Date | |
|---|---|---|---|
| 266a770c8e | |||
| a5f94e0a5f | |||
| fff7a4f685 | |||
| d0ae8893cc | |||
| 1b4eee6498 | |||
| ac779af339 | |||
| 1316a727f3 | |||
| be950ec8c1 | |||
| ca5a39d661 | |||
| fa0256d782 | |||
| 114c217ffa | |||
| 28cfdc180c | |||
| 116058ba77 | |||
| 4211548b8b | |||
| 12b17fd7af | |||
| 47b178fbc1 | |||
| 6ab63eb32c | |||
| 6445ab3f57 | |||
| 129672eb0f | |||
| 70031d3bfa | |||
| 9db5723746 | |||
| d4ab5c7e9c | |||
| b068fd176f | |||
| f70968fe01 | |||
| 1c70433b86 | |||
| 54b685ab42 | |||
| e6f6f6b185 | |||
| 7bb3b696f7 | |||
| 6cdf5310ba | |||
| 1967b791e0 | |||
| ebb4b9154e | |||
| b32132c71f | |||
| f398fe4824 | |||
| d5b87f23cf | |||
| 7f2fc93fa3 | |||
| 32e913c629 | |||
| 87c966062c | |||
| d7f867f1a6 | |||
| e188f3474f | |||
| 1e80845aa6 | |||
| a85569e54d | |||
| 65fac2f406 | |||
| 60e28f8fe5 | |||
| 792892cb82 | |||
| 9159073483 | |||
| 8745554cee | |||
| 096e374997 | |||
| f3fed535d8 | |||
| 5305561619 | |||
| 88048f14ec | |||
| 4d6d2f1df0 | |||
| 6dcf6d38da | |||
| 38e84ab9fe | |||
| 89395ba641 | |||
| 46b80c3e2a | |||
| 285e41434a | |||
| 58cbd44a7b | |||
| ef16f2b12b | |||
| 0a30712e31 | |||
| 87727d28b9 | |||
| ff0606d0a7 | |||
| 938b3e2f3c | |||
| 86b23f4e6f | |||
| 06f8949159 | |||
| e2ea89cc0b | |||
| e50ea6af31 | |||
| 66da13aed6 | |||
| 122493df19 | |||
| 6af487e5fd | |||
| 99c128d7ca | |||
| 901621da95 | |||
| 125a418e79 | |||
| 680d0610b1 | |||
| ce25b1dbae | |||
| 7dd7142455 | |||
| b4bc200fbd | |||
| 8960923514 | |||
| cd140a73f6 | |||
| 980adbe595 | |||
| ba54969990 | |||
| cbe6613c56 | |||
| e7c05a8387 | |||
| 9dac52c0e4 | |||
| b09eb63785 | |||
| 5556cc720c | |||
| 735d947126 | |||
| b69472640f | |||
| efbdffc6fc | |||
| 5407f66aae | |||
| 0e1b49675a | |||
| 0e5be56dfe | |||
| 71e5ce8b8e | |||
| 42afa3e7ab | |||
| d3c8d9c1af | |||
| 8fbd95ab77 | |||
| 8034d3018a | |||
| ebe0b1253f | |||
| a775126f9c | |||
| 28a7a0b6a2 | |||
| 30c7113713 | |||
| 03be6673c5 | |||
| 6e9ec938fc | |||
| 6841a52024 | |||
| 1d94455c1a | |||
| e7bda6af17 | |||
| 98b3b44ed5 | |||
| 7f5e0e8e79 | |||
| 74b5d69389 | |||
| 4f4215ced5 | |||
| 53654349b5 | |||
| 3cb389aabd | |||
| d48139c40f | |||
| 05e3c89ca1 | |||
| f5cf8115af | |||
| 97d33cf177 | |||
| 7e7b37f524 | |||
| 9aef7bb460 | |||
| cdc6461064 | |||
| 56910a8c58 | |||
| caffee4b15 | |||
| 141d27d4f1 | |||
| a42427f987 | |||
| 05c952fbe1 | |||
| ca16516073 | |||
| 03f927d1d5 | |||
| e502c97de5 | |||
| a44fd6c469 | |||
| e8a64fb014 | |||
| 81e21736b7 | |||
| 488c1807d6 | |||
| 0182e9663e | |||
| db2badfc0d | |||
| 1e3f66bb19 | |||
| 32087608cc | |||
| b1f0f173e7 | |||
| e9f1246e0a | |||
| 56407539aa | |||
| a6f0341fe4 | |||
| afa1c71a0a | |||
| dafc820466 | |||
| 614b4d8350 | |||
| 73342a0506 | |||
| c55644558a | |||
| 5f46b4feae | |||
| ca2ce289aa | |||
| 0bcf931465 | |||
| 5e98640ded | |||
| e72836e0f7 | |||
| ed40ffc43f | |||
| cc6ef8de46 | |||
| ef4267e926 | |||
| e32ee93e7a | |||
| 51dd0ef4ba | |||
| dcd5acb4d1 | |||
| bb0dcf2d9d | |||
| dfe7c0a011 | |||
| 68c98d1293 | |||
| ff2c15a505 | |||
| 4e9aa716bd | |||
| 8d8e764956 | |||
| bb660b0e04 | |||
| a4de98a0e7 | |||
| 2d400a18ec | |||
| 7744b92771 | |||
| 5704beaad4 | |||
| 0f4949b0ae | |||
| 774f5989ec | |||
| 9abea054b7 | |||
| 3c607200be | |||
| d506eed827 | |||
| 7f00898767 | |||
| 7f909c9f59 | |||
| ab835d6fc3 | |||
| 17bbe1a90e | |||
| 78108c4090 | |||
| 3c8f0bac1b | |||
| 87b63c2142 | |||
| 1f5df65c48 | |||
| 09b50d3b81 | |||
| 54912ad37e | |||
| 9a399ecfe9 | |||
| c3477244b9 | |||
| 0e8c62eb4b | |||
| e1b5c45b52 | |||
| d04f92ee7f | |||
| cd76ae22a4 | |||
| 2a11f02bd2 | |||
| 42539c9d95 | |||
| 6e77f0ec58 | |||
| 1c7651f0d5 | |||
| 44a5b3385c | |||
| 1e17184194 | |||
| 808106262e | |||
| b36d75af46 | |||
| d0c89a78c2 | |||
| f68d8b53a3 | |||
| 84ea33f029 | |||
| 6392e4b13a | |||
| 14f2c2fbe6 | |||
| a77226e42b | |||
| 8b4c6c2014 | |||
| 4009ddd422 | |||
| 6794c5eedd | |||
| 20ac5c387e | |||
| 30e998e386 | |||
| e87c8c9e1e | |||
| 92d3c0c861 | |||
| 0c190f1f76 | |||
| a3f7eb0b3c | |||
| 4f35bfd51f | |||
| fc6b30f03c | |||
| 22b0ceaff7 | |||
| 357153b978 | |||
| 5d1408ad9a | |||
| 9b9988569f | |||
| dda6262601 | |||
| 6e4e847be1 | |||
| 03d8eef5ae | |||
| 4e9dd2fa02 | |||
| dcf40822e3 | |||
| b6fc04a411 | |||
| af932a9911 | |||
| da212ac188 | |||
| 3436b9edbf | |||
| 8a4f64f545 | |||
| 1480ad8145 | |||
| 9042579518 | |||
| 11bc20fad5 | |||
| 8b9ed733dd | |||
| 5c95128dfc | |||
| beca78d7a7 | |||
| 54a1e74e27 | |||
| 909ef9d242 | |||
| 6ec0e9631a | |||
| 6f7a18d6b8 | |||
| 322fdf8deb | |||
| 012fe4bc4a | |||
| 502bdf47a3 | |||
| 437320b4ad | |||
| 3b6402a682 | |||
| fa25d13469 | |||
| 4c08359394 | |||
| b5400c8223 | |||
| 5a336e8d40 | |||
| 2d1a6b1b7f | |||
| 636e2e439c | |||
| b208592e3a | |||
| 95d1941545 | |||
| 086dfff19e | |||
| 0442df4287 | |||
| e3d167bd7f | |||
| da5ed78558 | |||
| 0c46c4e656 | |||
| 304818dc13 | |||
| 05ecd0b048 | |||
| 895ec55a46 | |||
| 67c6a6c95c | |||
| 107529f844 | |||
| f39b7ae14a | |||
| aafa528f03 | |||
| e3f903cd48 | |||
| 777fe83257 | |||
| 8752d47e01 | |||
| cc49df6e55 | |||
| 5b3586d8de | |||
| d0d3a7f134 | |||
| d114edc1e2 | |||
| b26a5e902c | |||
| 6678af412d | |||
| 34872d6b8b | |||
| d7745f908f | |||
| 38a2498494 | |||
| 8c513b624a | |||
| 0cfd64318f | |||
| ab1ad48608 | |||
| d6f9c012e9 | |||
| c8e2bea8fa | |||
| 16635078ac | |||
| d615158cf9 | |||
| f5faa6da5e | |||
| b140f0aaab | |||
| 35773f4a18 | |||
| 7f4b7fb1ff | |||
| becb749e02 | |||
| a2711a735d | |||
| 190d28b6df | |||
| c0d51af664 | |||
| 51bd9cf170 | |||
| cdf331463e | |||
| 679ab49047 | |||
| 919c8733a0 | |||
| be00453f2c | |||
| 275a5d0b04 | |||
| fada4f9a9d | |||
| 08a9dbdf1d | |||
| 06e69d86b6 | |||
| 06aec0308d | |||
| b07d76ce1d |
@@ -0,0 +1,2 @@
|
||||
dist/*
|
||||
doc/out/*
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 10,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"impliedStrict": true,
|
||||
"modules": true
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true,
|
||||
"jquery": true,
|
||||
"worker": true,
|
||||
"mocha": true,
|
||||
"serviceworker": true
|
||||
},
|
||||
"globals": {
|
||||
"PIXI": false,
|
||||
"TweenLite": false,
|
||||
"TweenMax": false,
|
||||
"TimelineLite": false,
|
||||
"TimelineMax": false,
|
||||
"SystemJS": false,
|
||||
"app": true
|
||||
},
|
||||
"plugins": [
|
||||
"prettier"
|
||||
],
|
||||
"extends": ["eslint:recommended", "plugin:prettier/recommended"]
|
||||
}
|
||||
@@ -79,4 +79,10 @@ typings/
|
||||
# own
|
||||
*.code-workspace
|
||||
.history/
|
||||
.vscode/
|
||||
|
||||
|
||||
# ignore generated contents-
|
||||
/doc/out/*
|
||||
**/thumbnails
|
||||
**/thumbnail.png
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": true,
|
||||
"tabWidth": 4,
|
||||
"semi": false,
|
||||
"printWidth": 120
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
dist/*
|
||||
doc/*
|
||||
lib/*
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"rules": {
|
||||
"indentation": 4,
|
||||
"selector-list-comma-newline-after": "never-multi-line",
|
||||
"no-eol-whitespace": [true, {
|
||||
"ignore": ["empty-lines"]
|
||||
}]
|
||||
},
|
||||
"ignoreFiles": []
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"program": "${workspaceFolder}\\index.js"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "testrunner",
|
||||
"program": "${workspaceFolder}\\bin\\testrunner.js"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "single",
|
||||
"program": "${workspaceFolder}\\bin\\singleshot.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -40,6 +40,8 @@ Afterwards you can view the documentation here:
|
||||
|
||||
## Useful PixiJS Resources
|
||||
|
||||
Currently using PixiJS version 5
|
||||
|
||||
- The PixiJS [JavaScript API Docs](http://pixijs.download/dev/docs/index.html)
|
||||
- The PixiJS [Examples](http://pixijs.github.io/examples/#/basics/basic.js)
|
||||
- The PixiJS [GitHub Repository](https://github.com/pixijs/pixi.js)
|
||||
@@ -47,4 +49,4 @@ Afterwards you can view the documentation here:
|
||||
## List of 3<sup>rd</sup> party libraries included
|
||||
|
||||
- [PixiJS](http://www.pixijs.com)
|
||||
- [Greensock](https://greensock.com) with TweenLite
|
||||
- [Greensock](https://greensock.com) with TweenMax and TimelineMax
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
|
||||
<rect x="0" y="0" width="100" height="100" style="fill:#6699FF; stroke:rgba(0,0,0,0)" />
|
||||
<g stroke-width="10" stroke="white">
|
||||
<line x1="25" y1="25" x2="75" y2="75" />
|
||||
<line x1="25" y1="75" x2="75" y2="25" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 478 B |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
|
||||
<line x1="20" y1="20" x2="80" y2="80" stroke="black" stroke-width="8" />
|
||||
<line x1="80" y1="20" x2="20" y2="80" stroke="black" stroke-width="8" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 402 B |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet" >
|
||||
<rect x="0" y="0" width="100" height="100" style="fill:#6699FF; stroke:rgba(0,0,0,0)" />
|
||||
<circle cx="50" cy="33" r="8" fill="rgb(235, 230, 220)" />
|
||||
<line x1="50" y1="44" x2="50" y2="75" stroke="rgb(235, 230, 220)" stroke-width="14" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 497 B |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
|
||||
<line x1="20" y1="80" x2="80" y2="20" stroke="lightgray" stroke-width="8" />
|
||||
<line x1="40" y1="80" x2="80" y2="40" stroke="lightgray" stroke-width="8" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
@@ -0,0 +1,23 @@
|
||||
Testrunner prerequisites
|
||||
========================
|
||||
|
||||
npm install puppeteer
|
||||
|
||||
|
||||
testrunner.js
|
||||
-------------
|
||||
start from iwmlib directory with node testrunner
|
||||
|
||||
defined in package.json
|
||||
"testrunner": "node bin/testrunner.js"
|
||||
|
||||
or in vscode, defined in launch.json like
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "testrunner",
|
||||
"program": "${workspaceFolder}\\bin\\testrunner.js"
|
||||
}
|
||||
|
||||
iterates all doctest.html files that are listed in index.html
|
||||
create a screenshot of all pages
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* test one single page, make a screenshot and log errors to
|
||||
* console
|
||||
* (c) 2019 - Leibniz-Insitut für Wissensmedien
|
||||
*
|
||||
*/
|
||||
const puppeteer = require('puppeteer');
|
||||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
const start_dir = process.cwd()
|
||||
|
||||
|
||||
// const start_file = path.join(start_dir,"lib","frames.html")
|
||||
const start_file = path.join(start_dir,"lib","pixi","badge.html")
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
const events = ["error","pageerror"]
|
||||
function logPageEvent(event){
|
||||
if(event !== undefined){
|
||||
console.log(event.message)
|
||||
}
|
||||
}
|
||||
|
||||
async function makeScreenshot(href){
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
// headless: false,
|
||||
// loglevel : 0,
|
||||
args : [
|
||||
'–allow-file-access-from-files',
|
||||
],});
|
||||
const page = await browser.newPage();
|
||||
|
||||
await page.setViewport({width: 1024,height : 624})
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
page.on(events[i],logPageEvent)
|
||||
}
|
||||
page.once("load",logPageEvent)
|
||||
|
||||
// await Promise.all([ page.coverage.startJSCoverage() ]);
|
||||
await page.goto(href)
|
||||
// const jsCoverage = await Promise.all([ page.coverage.stopJSCoverage() ]);
|
||||
|
||||
const fname = path.parse(href).name
|
||||
|
||||
if (fname != "index"){
|
||||
image_url = href.replace(fname + ".html" ,"thumbnails/" + fname + ".png")
|
||||
}
|
||||
else{
|
||||
image_url = href.replace(fname + ".html" ,"thumbnail.png")
|
||||
}
|
||||
image_url = image_url.replace("file:///","")
|
||||
console.log(image_url)
|
||||
// console.log(jsCoverage)
|
||||
|
||||
page.removeAllListeners()
|
||||
|
||||
await page.screenshot({path: image_url});
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
|
||||
(async function(){
|
||||
|
||||
await makeScreenshot(start_file)
|
||||
}
|
||||
)()
|
||||
@@ -0,0 +1,116 @@
|
||||
/**
|
||||
*
|
||||
* make screenshots and log errors to
|
||||
* console
|
||||
* (c) 2019 - Leibniz-Insitut für Wissensmedien
|
||||
*
|
||||
*/
|
||||
|
||||
const puppeteer = require('puppeteer');
|
||||
const fs_bare = require("fs") // required for fs-extra
|
||||
const fs = require("fs-extra")
|
||||
const path = require("path")
|
||||
const start_dir = process.cwd()
|
||||
const start_file = path.join(start_dir,"lib","index.html")
|
||||
|
||||
const start_file_uri = path.join("file:///", start_file )
|
||||
|
||||
// define events and log them
|
||||
const events = ["error","pageerror"]
|
||||
function logPageEvent(event){
|
||||
if (event !== undefined){
|
||||
console.log(event.toString())
|
||||
}
|
||||
}
|
||||
|
||||
async function makeScreenshot(href){
|
||||
|
||||
const browser = await puppeteer.launch({args: [
|
||||
'–allow-file-access-from-files',
|
||||
],});
|
||||
|
||||
const page = await browser.newPage();
|
||||
|
||||
await page.setViewport({width: 1024,height : 624})
|
||||
|
||||
// register events
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
page.on(events[i],logPageEvent)
|
||||
}
|
||||
page.once("load",logPageEvent)
|
||||
|
||||
await page.goto(href)
|
||||
href = href.replace("file:///","")
|
||||
const fname = path.parse(href).name
|
||||
let fpath
|
||||
if (fname != "index"){
|
||||
image_url = href.replace(fname + ".html" ,"thumbnails/" + fname + ".png")
|
||||
fpath = href.replace(fname + ".html", "thumbnails")
|
||||
}
|
||||
else{
|
||||
image_url = href.replace(fname + ".html" ,"thumbnail.png")
|
||||
fpath = href.replace(fname + ".html", "")
|
||||
}
|
||||
// image_url = image_url.replace("file:///","")
|
||||
// fpath = fpath.replace("file:///","")
|
||||
|
||||
page.removeAllListeners()
|
||||
|
||||
fs.ensureDir(fpath)
|
||||
|
||||
await page.screenshot({path: image_url});
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* collect all navigational links in all documents
|
||||
*
|
||||
* */
|
||||
|
||||
async function collectLinks(href,reflist)
|
||||
{
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
|
||||
|
||||
await page.goto(href)
|
||||
let hrefs = await page.$$('a.wrapper')
|
||||
|
||||
for (var i=0; i < hrefs.length; i++) {
|
||||
let hrefValue = await hrefs[i].getProperty('href')
|
||||
let linkText = await hrefValue.jsonValue();
|
||||
if (!linkText.startsWith("file:"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(linkText.endsWith("#")) continue;
|
||||
if(linkText.endsWith("index.html")){
|
||||
await collectLinks(linkText,reflist)
|
||||
}
|
||||
reflist.push(linkText)
|
||||
}
|
||||
|
||||
await browser.close()
|
||||
}
|
||||
|
||||
(async function(){
|
||||
var reflist = []
|
||||
let linkText = "file:///" + start_file.replace(/\\/g,"/")
|
||||
reflist.push(linkText)
|
||||
await collectLinks(start_file_uri,reflist)
|
||||
|
||||
// sort by path length to get depth first
|
||||
reflist.sort(function(a,b){
|
||||
let al = a.split("/").length
|
||||
let bl = b.split("/").length
|
||||
|
||||
if (al < bl) {return 1 }
|
||||
if (al > bl) {return -1 }
|
||||
if (al == bl) {return 0 }
|
||||
})
|
||||
for (var i=0;i<reflist.length; i++) {
|
||||
await makeScreenshot(reflist[i])
|
||||
console.log(i,reflist[i])
|
||||
}
|
||||
})()
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
color: black;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
article {
|
||||
top: 66px;
|
||||
}
|
||||
@@ -0,0 +1,440 @@
|
||||
@font-face {
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(../fonts/material-icon-font/MaterialIcons-Regular.eot);
|
||||
/* For IE6-8 */
|
||||
src: local("Material Icons"), local("MaterialIcons-Regular"), url(../fonts/material-icon-font/MaterialIcons-Regular.woff2) format("woff2"), url(../fonts/material-icon-font/MaterialIcons-Regular.woff) format("woff"), url(../fonts/material-icon-font/MaterialIcons-Regular.ttf) format("truetype");
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
/* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
/* Support for IE. */
|
||||
-webkit-font-feature-settings: 'liga';
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
header {
|
||||
color: white;
|
||||
min-height: 33%;
|
||||
}
|
||||
|
||||
main {
|
||||
min-height: 67%;
|
||||
}
|
||||
|
||||
article {
|
||||
margin: 0px;
|
||||
padding: 32px;
|
||||
padding-right: 64px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
top: 66px;
|
||||
}
|
||||
|
||||
.preview img {
|
||||
max-height: 120px;
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.preview p {
|
||||
margin-top: 44px;
|
||||
}
|
||||
|
||||
.preview {
|
||||
text-align: center;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
position: relative;
|
||||
box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.1);
|
||||
border: 2px solid lightgrey;
|
||||
float: left;
|
||||
margin: 12px;
|
||||
max-height: 300px;
|
||||
max-width: 480px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.mainview {
|
||||
background-color: #444;
|
||||
color: white;
|
||||
padding: 32px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
width: 1400px;
|
||||
height: 1200px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.subcard {
|
||||
position: relative;
|
||||
background-color: white;
|
||||
height: 300px;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.svg-wrapper {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.subcard h3 {
|
||||
color: black;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.card-icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.zoom-icon {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.zoomable-wrapper {
|
||||
display: inline-block;
|
||||
-ms-flex-item-align: center;
|
||||
-ms-grid-row-align: center;
|
||||
align-self: center;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.zoomable-wrapper figure {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.zoomable-wrapper figcaption {
|
||||
font-size: initial;
|
||||
}
|
||||
|
||||
.zoomable-wrapper>figure>div {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.zoomable-wrapper svg {
|
||||
overflow: visible;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ------------ zoomables and zoomed items below ------------ */
|
||||
|
||||
.imggroupcontainer {
|
||||
margin-top: 10px;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.imggroupcontainer:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.imggroupcontainer:before {
|
||||
content: '';
|
||||
display: block;
|
||||
margin-top: -1.25em;
|
||||
}
|
||||
|
||||
.imgcontainer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.singlefig {
|
||||
max-width: 50%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.videofig {
|
||||
max-width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.groupfig {
|
||||
max-width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
figure img {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
figure svg {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
figure video {
|
||||
object-fit: cover;
|
||||
/*box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
|
||||
border: 10px solid rgba(122, 0, 0, 0.05);*/
|
||||
}
|
||||
|
||||
figure .mainimg {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
/*box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
|
||||
border: 10px solid rgba(122, 0, 0, 0.05);*/
|
||||
}
|
||||
|
||||
figure .groupmainimg {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
/*box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
|
||||
border: 10px solid rgba(122, 0, 0, 0.05);*/
|
||||
}
|
||||
|
||||
figcaption {
|
||||
/* position: absolute; */
|
||||
text-align: center;
|
||||
padding-top: 6px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.zoomcap {
|
||||
/*position: absolute;*/
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
box-shadow: 1px 4px 8px rgba(0, 0, 0, 0.5);
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.cap {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.zoomed-figure {
|
||||
position: absolute;
|
||||
font-family: 'MyriadRegular', sans-serif;
|
||||
background: white;
|
||||
box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.zoomed-figure img {
|
||||
top: 0px;
|
||||
/*box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
|
||||
border: 10px solid rgba(122, 0, 0, 0.05);*/
|
||||
}
|
||||
|
||||
.zoomed-figure figure {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.zoomed-figure figcaption {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ZoomedIcon {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.subcard-content {
|
||||
padding: 25px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
-webkit-hyphens: auto;
|
||||
}
|
||||
|
||||
/* ------------ bulma overwrites below ------------ */
|
||||
|
||||
.content h1 {
|
||||
min-height: 70px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content figure {
|
||||
background: transparent;
|
||||
display: block;
|
||||
margin-left: 0em;
|
||||
margin-right: 0em;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
padding: 25px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
-webkit-hyphens: auto;
|
||||
}
|
||||
|
||||
.content:not(:last-child) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card-icon, .zoomable-icon {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.speech-only-text {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
figure .icon {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.button {
|
||||
border: 0px solid transparent;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.view-button.icon {
|
||||
background-color: #6699FF;
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.view-button.icon.inverted:before {
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.view-button.icon:before {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.view-button.icon:hover {
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.icon {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
color: white;
|
||||
background-color: #6699FF;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.icon.button {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.icon.button.corner-button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.icon.button.corner-button.bottom-right {}
|
||||
|
||||
.icon.inverted {
|
||||
color: #f2f2f2;
|
||||
background-color: #6699FF;
|
||||
}
|
||||
|
||||
.icon.transparent-background {
|
||||
background-color: #6699FF;
|
||||
}
|
||||
|
||||
.icon.active {
|
||||
color: #f2f2f2;
|
||||
background-color: #6699FF;
|
||||
}
|
||||
|
||||
.icon:before {
|
||||
font-family: "Material Icons";
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.icon.info {
|
||||
background-color: transparent;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.icon.info:before {
|
||||
font-size: 44px;
|
||||
color: transparent;
|
||||
content: url("../assets/images/info.svg") "w";
|
||||
}
|
||||
|
||||
.icon.close:before {
|
||||
content: "close";
|
||||
}
|
||||
|
||||
.icon.zoom:before {
|
||||
content: "search";
|
||||
}
|
||||
|
||||
.icon.speech:before {
|
||||
content: "record_voice_over";
|
||||
}
|
||||
|
||||
.icon.language:before {
|
||||
content: "language";
|
||||
}
|
||||
|
||||
.info-card.debug .view-button {
|
||||
background-color: rgba(255, 0, 0, 0.5) !important;
|
||||
}
|
||||
|
||||
.info-card.debug .view-button.disabled {
|
||||
-webkit-filter: grayscale(1);
|
||||
filter: grayscale(1);
|
||||
}
|
||||
@@ -1,12 +1,208 @@
|
||||
html
|
||||
{
|
||||
padding: 0px;
|
||||
font-size: 16px;
|
||||
background: white;
|
||||
font-family: Arial,sans-serif;
|
||||
color: #000;
|
||||
max-width: 932px;
|
||||
margin:0 auto;
|
||||
:root {
|
||||
--white: rgb(250, 250, 250);
|
||||
--light-gray: rgb(219, 219, 219);
|
||||
--gray: rgb(66, 66, 66);
|
||||
--black: rgb(20, 20, 20);
|
||||
--dark-background: rgb(50, 50, 50);
|
||||
|
||||
--border-radius: 5px;
|
||||
}
|
||||
|
||||
html {
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
background: var(--white);
|
||||
color: var(--black);
|
||||
font-family: 'Open Sans', Arial, sans-serif;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.dark-mode nav{
|
||||
border-color: var(--white);
|
||||
}
|
||||
|
||||
nav {
|
||||
margin-top: 50px;
|
||||
min-width: 30%;
|
||||
border-radius: var(--border-radius);
|
||||
display: inline-block;
|
||||
padding: 20px 30px;
|
||||
/* background-color: var(--light-gray); */
|
||||
border: 1px solid var(--black);
|
||||
}
|
||||
|
||||
nav > h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
nav > ol a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
html.dark-mode {
|
||||
background: var(--dark-background);
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.dark-mode h1,
|
||||
.dark-mode h2,
|
||||
.dark-mode h3,
|
||||
.dark-mode h4,
|
||||
.dark-mode h5,
|
||||
.dark-mode h6 {
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #569cd6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dark-mode a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dark-mode button {
|
||||
border: 1px solid rgb(211, 211, 211);
|
||||
color: rgb(211, 211, 211);
|
||||
background: linear-gradient(to top, rgb(53, 53, 53), rgb(73, 73, 73));
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--white);
|
||||
border: 1px solid var(--gray);
|
||||
color: var(--gray);
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type='checkbox'] {
|
||||
display: none;
|
||||
}
|
||||
input[type='checkbox'] + .checkbox {
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.controls > * {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.dark-mode .checkbox {
|
||||
background-color: var(--gray);
|
||||
border: 1px solid var(--white);
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
background-color: var(--white);
|
||||
border: 1px solid var(--black);
|
||||
}
|
||||
|
||||
.checkbox:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
input[type='checkbox']:checked + .checkbox {
|
||||
background-color: rgb(174, 238, 78);
|
||||
}
|
||||
|
||||
input[type='checkbox']:checked + .checkbox:after {
|
||||
left: 11px;
|
||||
top: 6px;
|
||||
width: 5px;
|
||||
height: 12px;
|
||||
border: solid var(--white);
|
||||
border-width: 0 4px 4px 0;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
filter: brightness(0.95);
|
||||
}
|
||||
|
||||
button:focus {
|
||||
box-shadow: 0 0 3px 1px #569cd6;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.title {
|
||||
position: relative;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-style: italic;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.doctest {
|
||||
margin: 0;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.collapsed .doctest {
|
||||
height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.doctest-wrapper {
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.doctest-titlebar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: whitesmoke;
|
||||
background-color: #111;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.doctest-section-title {
|
||||
margin: 0;
|
||||
margin-left: 40px;
|
||||
|
||||
padding: 0;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.grayBorder {
|
||||
@@ -24,10 +220,10 @@ html
|
||||
}
|
||||
|
||||
.unselectable {
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -35,8 +231,8 @@ body {
|
||||
}
|
||||
|
||||
canvas {
|
||||
-ms-content-zooming: none; /** Crucial for MS Edge pointer events **/
|
||||
touch-action: none; /** Crucial for MS Edge? **/
|
||||
-ms-content-zooming: none; /** Crucial for MS Edge pointer events **/
|
||||
touch-action: none; /** Crucial for MS Edge? **/
|
||||
}
|
||||
|
||||
#runtime-errors {
|
||||
@@ -44,28 +240,27 @@ canvas {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
|
||||
.intrinsic-container {
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 16x9 Aspect Ratio */
|
||||
.intrinsic-container-16x9 {
|
||||
padding-bottom: 56.25%;
|
||||
padding-bottom: 56.25%;
|
||||
}
|
||||
|
||||
/* 4x3 Aspect Ratio */
|
||||
.intrinsic-container-4x3 {
|
||||
padding-bottom: 75%;
|
||||
padding-bottom: 75%;
|
||||
}
|
||||
|
||||
.intrinsic-container iframe {
|
||||
position: absolute;
|
||||
border: 0;
|
||||
top:0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
border: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
.flipWrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* Fix to render
|
||||
.flipWrapper > div:first-child{
|
||||
z-index: 1;
|
||||
} */
|
||||
|
||||
.flipCard {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
/*** See: https://stackoverflow.com/questions/7439042/css-js-to-prevent-dragging-of-ghost-image ***/
|
||||
|
||||
/* -webkit-user-drag: none;
|
||||
-khtml-user-drag: none;
|
||||
-moz-user-drag: none;
|
||||
-o-user-drag: none;
|
||||
user-drag: none; */
|
||||
}
|
||||
|
||||
.flipFace {
|
||||
box-shadow: 2px 2px 10px #000;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.front {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.back {
|
||||
background-color: #333;
|
||||
position: absolute;
|
||||
border: 8px solid white;
|
||||
}
|
||||
|
||||
.closeBtn {
|
||||
transform-origin: top right;
|
||||
position: absolute;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 4px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.infoBtn {
|
||||
transform-origin: bottom right;
|
||||
position: fixed;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 4px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.backBtn {
|
||||
transform-origin: bottom right;
|
||||
position: fixed;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 4px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
circle {
|
||||
stroke: white;
|
||||
fill: transparent;
|
||||
stroke-width: 8px;
|
||||
}
|
||||
|
||||
mask circle {
|
||||
stroke-width: 0;
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.addedImage {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
.debugRect {
|
||||
stroke: red;
|
||||
fill: transparent;
|
||||
stroke-width: 8px;
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: sans-serif;
|
||||
font-size: 22pt;
|
||||
-webkit-tap-highlight-color: #ccc;
|
||||
background-color: #ddd;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-overflow-scrolling: auto;
|
||||
user-select: none;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
|
||||
/* https://davidwalsh.name/font-smoothing */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: white;
|
||||
padding: 4px;
|
||||
margin: 2px;
|
||||
background-color: rgba(0, 0, 15, 0.5);
|
||||
}
|
||||
|
||||
a { text-decoration: none; }
|
||||
|
||||
div.wrapper {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-origin: 0% 100%;
|
||||
transform: scale(0.25);
|
||||
}
|
||||
|
||||
/* Color animation from https://www.tjvantoll.com/2012/02/20/css3-color-animations/ */
|
||||
@-webkit-keyframes color_change {
|
||||
from { background-color: rgba(0, 0, 0, 0); }
|
||||
to { background-color: red; }
|
||||
}
|
||||
|
||||
@-moz-keyframes color_change {
|
||||
from { background-color: rgba(0, 0, 0, 0); }
|
||||
to { background-color: red; }
|
||||
}
|
||||
|
||||
@-ms-keyframes color_change {
|
||||
from { background-color: rgba(0, 0, 0, 0); }
|
||||
to { background-color: red; }
|
||||
}
|
||||
|
||||
@-o-keyframes color_change {
|
||||
from { background-color: rgba(0, 0, 0, 0); }
|
||||
to { background-color: red; }
|
||||
}
|
||||
|
||||
@keyframes color_change {
|
||||
from { background-color: rgba(0, 0, 0, 0); }
|
||||
to { background-color: red; }
|
||||
}
|
||||
|
||||
/*** CSS taken from https://medium.com/@jamesfuthey/simulating-the-creation-of-website-thumbnail-screenshots-using-iframes-7145269891db#.7v7fshos5 ***/
|
||||
.thumbnail {
|
||||
position: relative;
|
||||
-ms-zoom: 0.25;
|
||||
-moz-transform: scale(0.25);
|
||||
-moz-transform-origin: 0 0;
|
||||
-o-transform: scale(0.25);
|
||||
-o-transform-origin: 0 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
-webkit-transform-origin: 0 0;
|
||||
}
|
||||
|
||||
.thumbnail::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: -1024px; /*** This is a deviation from the above mentioned
|
||||
jamesfuthey blog. Otherwise touches would go through on iPad. ***/
|
||||
}
|
||||
|
||||
iframe {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.thumbnail iframe {
|
||||
width: 1024px;
|
||||
height: 624px;
|
||||
-webkit-animation-delay: 3s; /* Safari 4.0 - 8.0 */
|
||||
animation-delay: 3s;
|
||||
-webkit-animation: color_change 1s infinite alternate;
|
||||
-moz-animation: color_change 1s infinite alternate;
|
||||
-ms-animation: color_change 1s infinite alternate;
|
||||
-o-animation: color_change 1s infinite alternate;
|
||||
animation: color_change 1s infinite alternate;
|
||||
}
|
||||
|
||||
.thumbnail-container {
|
||||
width: calc(1024px * 0.25);
|
||||
height: calc(624px * 0.25);
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
box-shadow: 2px 2px 10px #000;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
div.preview {
|
||||
display: inline-block;
|
||||
margin: 22px;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
font-size: 12pt;
|
||||
text-align: center;
|
||||
width: 256px;
|
||||
height: 196px;
|
||||
}
|
||||
|
||||
div.title {
|
||||
padding-top: 8px;
|
||||
width: 256px;
|
||||
height: 20px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 2pt #000;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
display: -webkit-flex;
|
||||
-webkit-align-items: flex-end;
|
||||
align-items: flex-end;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-align-content: flex-end;
|
||||
align-content: flex-end;
|
||||
}
|
||||
|
||||
/** See https://github.com/electron/electron/issues/4420 */
|
||||
::selection {
|
||||
background: transparent;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
.popup {
|
||||
width: 800px;
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
min-width: 400px;
|
||||
color: #191919;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
||||
padding: 25.64px 40px;
|
||||
}
|
||||
|
||||
.popup img {
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.popup img:not(:first-child) {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.popup img:not(:last-child) {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.popup .notch {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.PopupContent p:not(:last-child) {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
.info-card .subcard {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.info-card .subcard p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.info-card .content h1 {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.info-card .subcard .preview p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info-card>.zoomable-wrapper figcaption, .info-card .mainview>.subcard figcaption {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -20,4 +20,3 @@ This is the JavaScript API documentation of the IWM Browser JavaScript classes.
|
||||
|
||||
- [PixiJS](http://www.pixijs.com)
|
||||
- [Greensock](https://greensock.com) with all Plugins
|
||||
- [D3](https://d3js.org)
|
||||
|
||||
@@ -31,11 +31,26 @@
|
||||
"./lib/pixi/popup.js",
|
||||
"./lib/pixi/popupmenu.js",
|
||||
"./lib/pixi/progress.js",
|
||||
"./lib/pixi/scrollview.js",
|
||||
"./lib/pixi/slider.js",
|
||||
"./lib/pixi/switch.js",
|
||||
"./lib/pixi/theme.js",
|
||||
"./lib/pixi/tooltip.js",
|
||||
"./lib/pixi/volatile.js"
|
||||
"./lib/pixi/volatile.js",
|
||||
"./lib/pixi/maps/mapapp.js",
|
||||
"./lib/pixi/maps/mapviewport.js",
|
||||
"./lib/pixi/maps/geographics.js",
|
||||
"./lib/pixi/maps/geojson.js",
|
||||
"./lib/pixi/maps/geolayer.js",
|
||||
"./lib/pixi/maps/mapprojection.js",
|
||||
"./lib/pixi/maps/maplist.js",
|
||||
"./lib/pixi/maps/overlay.js",
|
||||
"./lib/pixi/maps/scatter.js",
|
||||
"./lib/pixi/maps/utils.js",
|
||||
"./lib/pixi/maps/map.js",
|
||||
"./lib/pixi/maps/projections/projection.js",
|
||||
"./lib/pixi/maps/projections/mercator.js",
|
||||
"./lib/pixi/maps/projections/robinson.js"
|
||||
],
|
||||
"exclude": [],
|
||||
"includePattern": ".+\\.js(doc|x)?$",
|
||||
@@ -44,7 +59,10 @@
|
||||
"sourceType": "module",
|
||||
"tags": {
|
||||
"allowUnknownTags": true,
|
||||
"dictionaries": ["jsdoc", "closure"]
|
||||
"dictionaries": [
|
||||
"jsdoc",
|
||||
"closure"
|
||||
]
|
||||
},
|
||||
"templates": {
|
||||
"applicationName": "iwmlib",
|
||||
@@ -69,4 +87,4 @@
|
||||
"useLongnameInNav": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
(function(){var e=0;var a;var t=document.getElementById("source-code");if(t){var n=config.linenums;if(n){t=t.getElementsByTagName("ol")[0];a=Array.prototype.slice.apply(t.children);a=a.map(function(a){e++;a.id="line"+e})}else{t=t.getElementsByTagName("code")[0];a=t.innerHTML.split("\n");a=a.map(function(a){e++;return'<span id="line'+e+'"></span>'+a});t.innerHTML=a.join("\n")}}})();$(function(){var e=$(".navigation");var a=e.find(".list");var t=$(".search");$("#search").on("keyup",function(t){var n=this.value.trim();if(n){var s=new RegExp(n,"i");e.addClass("searching").removeClass("not-searching").find("li, .itemMembers").removeClass("match");e.find("li").each(function(e,a){var t=$(a);if(t.data("name")&&s.test(t.data("name"))){t.addClass("match");t.closest(".itemMembers").addClass("match");t.closest(".item").addClass("match")}})}else{e.removeClass("searching").addClass("not-searching").find(".item, .itemMembers").removeClass("match")}a.scrollTop(0)});$("#menuToggle").click(function(){a.toggleClass("show");t.toggleClass("show")});e.addClass("not-searching");var n=$(".page-title").data("filename").replace(/\.[a-z]+$/,"");var s=e.find('.item[data-name*="'+n+'"]:eq(0)');if(s.length){s.remove().prependTo(a).addClass("current")}if(config.disqus){$(window).on("load",function(){var e=config.disqus;var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="http://"+e+".disqus.com/embed.js";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a);var t=document.createElement("script");t.async=true;t.type="text/javascript";t.src="http://"+e+".disqus.com/count.js";document.getElementsByTagName("BODY")[0].appendChild(t)})}});
|
||||
(function(){var e=0;var a;var t=document.getElementById("source-code");if(t){var n=config.linenums;if(n){t=t.getElementsByTagName("ol")[0];a=Array.prototype.slice.apply(t.children);a=a.map(function(a){e++;a.id="line"+e})}else{t=t.getElementsByTagName("code")[0];a=t.innerHTML.split("\n");a=a.map(function(a){e++;return'<span id="line'+e+'"></span>'+a});t.innerHTML=a.join("\n")}}})();$(function(){var e=$(".navigation");var a=e.find(".list");var t=$(".search");$("#search").on("keyup",function(t){var n=this.value.trim();if(n){var s=new RegExp(n,"i");e.addClass("searching").removeClass("not-searching").find("li, .itemMembers").removeClass("match");e.find("li").each(function(e,a){var t=$(a);if(t.data("name")&&s.test(t.data("name"))){t.addClass("match");t.closest(".itemMembers").addClass("match");t.closest(".item").addClass("match")}})}else{e.removeClass("searching").addClass("not-searching").find(".item, .itemMembers").removeClass("match")}a.scrollTop(0)});$("#menuToggle").click(function(){a.toggleClass("show");t.toggleClass("show")});e.addClass("not-searching");var n=$(".page-title").data("filename").replace(/\.[a-z]+$/,"");var s=e.find('a[href*="'+n+'"]:eq(0)').closest(".item");if(s.length){if(s.parents(".children").length){s.addClass("current");s.find("li.item").addClass("notCurrent");s=s.parents("ul.list>li.item")}s.remove().prependTo(a).addClass("current")}if(config.disqus){$(window).on("load",function(){var e=config.disqus;var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="http://"+e+".disqus.com/embed.js";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a);var t=document.createElement("script");t.async=true;t.type="text/javascript";t.src="http://"+e+".disqus.com/count.js";document.getElementsByTagName("BODY")[0].appendChild(t)})}});
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 275 KiB |
@@ -0,0 +1,9 @@
|
||||
The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts:
|
||||
|
||||
```html
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||
rel="stylesheet">
|
||||
```
|
||||
|
||||
Read more in our full usage guide:
|
||||
http://google.github.io/material-design-icons/#icon-font-for-the-web
|
||||
@@ -0,0 +1,932 @@
|
||||
3d_rotation e84d
|
||||
ac_unit eb3b
|
||||
access_alarm e190
|
||||
access_alarms e191
|
||||
access_time e192
|
||||
accessibility e84e
|
||||
accessible e914
|
||||
account_balance e84f
|
||||
account_balance_wallet e850
|
||||
account_box e851
|
||||
account_circle e853
|
||||
adb e60e
|
||||
add e145
|
||||
add_a_photo e439
|
||||
add_alarm e193
|
||||
add_alert e003
|
||||
add_box e146
|
||||
add_circle e147
|
||||
add_circle_outline e148
|
||||
add_location e567
|
||||
add_shopping_cart e854
|
||||
add_to_photos e39d
|
||||
add_to_queue e05c
|
||||
adjust e39e
|
||||
airline_seat_flat e630
|
||||
airline_seat_flat_angled e631
|
||||
airline_seat_individual_suite e632
|
||||
airline_seat_legroom_extra e633
|
||||
airline_seat_legroom_normal e634
|
||||
airline_seat_legroom_reduced e635
|
||||
airline_seat_recline_extra e636
|
||||
airline_seat_recline_normal e637
|
||||
airplanemode_active e195
|
||||
airplanemode_inactive e194
|
||||
airplay e055
|
||||
airport_shuttle eb3c
|
||||
alarm e855
|
||||
alarm_add e856
|
||||
alarm_off e857
|
||||
alarm_on e858
|
||||
album e019
|
||||
all_inclusive eb3d
|
||||
all_out e90b
|
||||
android e859
|
||||
announcement e85a
|
||||
apps e5c3
|
||||
archive e149
|
||||
arrow_back e5c4
|
||||
arrow_downward e5db
|
||||
arrow_drop_down e5c5
|
||||
arrow_drop_down_circle e5c6
|
||||
arrow_drop_up e5c7
|
||||
arrow_forward e5c8
|
||||
arrow_upward e5d8
|
||||
art_track e060
|
||||
aspect_ratio e85b
|
||||
assessment e85c
|
||||
assignment e85d
|
||||
assignment_ind e85e
|
||||
assignment_late e85f
|
||||
assignment_return e860
|
||||
assignment_returned e861
|
||||
assignment_turned_in e862
|
||||
assistant e39f
|
||||
assistant_photo e3a0
|
||||
attach_file e226
|
||||
attach_money e227
|
||||
attachment e2bc
|
||||
audiotrack e3a1
|
||||
autorenew e863
|
||||
av_timer e01b
|
||||
backspace e14a
|
||||
backup e864
|
||||
battery_alert e19c
|
||||
battery_charging_full e1a3
|
||||
battery_full e1a4
|
||||
battery_std e1a5
|
||||
battery_unknown e1a6
|
||||
beach_access eb3e
|
||||
beenhere e52d
|
||||
block e14b
|
||||
bluetooth e1a7
|
||||
bluetooth_audio e60f
|
||||
bluetooth_connected e1a8
|
||||
bluetooth_disabled e1a9
|
||||
bluetooth_searching e1aa
|
||||
blur_circular e3a2
|
||||
blur_linear e3a3
|
||||
blur_off e3a4
|
||||
blur_on e3a5
|
||||
book e865
|
||||
bookmark e866
|
||||
bookmark_border e867
|
||||
border_all e228
|
||||
border_bottom e229
|
||||
border_clear e22a
|
||||
border_color e22b
|
||||
border_horizontal e22c
|
||||
border_inner e22d
|
||||
border_left e22e
|
||||
border_outer e22f
|
||||
border_right e230
|
||||
border_style e231
|
||||
border_top e232
|
||||
border_vertical e233
|
||||
branding_watermark e06b
|
||||
brightness_1 e3a6
|
||||
brightness_2 e3a7
|
||||
brightness_3 e3a8
|
||||
brightness_4 e3a9
|
||||
brightness_5 e3aa
|
||||
brightness_6 e3ab
|
||||
brightness_7 e3ac
|
||||
brightness_auto e1ab
|
||||
brightness_high e1ac
|
||||
brightness_low e1ad
|
||||
brightness_medium e1ae
|
||||
broken_image e3ad
|
||||
brush e3ae
|
||||
bubble_chart e6dd
|
||||
bug_report e868
|
||||
build e869
|
||||
burst_mode e43c
|
||||
business e0af
|
||||
business_center eb3f
|
||||
cached e86a
|
||||
cake e7e9
|
||||
call e0b0
|
||||
call_end e0b1
|
||||
call_made e0b2
|
||||
call_merge e0b3
|
||||
call_missed e0b4
|
||||
call_missed_outgoing e0e4
|
||||
call_received e0b5
|
||||
call_split e0b6
|
||||
call_to_action e06c
|
||||
camera e3af
|
||||
camera_alt e3b0
|
||||
camera_enhance e8fc
|
||||
camera_front e3b1
|
||||
camera_rear e3b2
|
||||
camera_roll e3b3
|
||||
cancel e5c9
|
||||
card_giftcard e8f6
|
||||
card_membership e8f7
|
||||
card_travel e8f8
|
||||
casino eb40
|
||||
cast e307
|
||||
cast_connected e308
|
||||
center_focus_strong e3b4
|
||||
center_focus_weak e3b5
|
||||
change_history e86b
|
||||
chat e0b7
|
||||
chat_bubble e0ca
|
||||
chat_bubble_outline e0cb
|
||||
check e5ca
|
||||
check_box e834
|
||||
check_box_outline_blank e835
|
||||
check_circle e86c
|
||||
chevron_left e5cb
|
||||
chevron_right e5cc
|
||||
child_care eb41
|
||||
child_friendly eb42
|
||||
chrome_reader_mode e86d
|
||||
class e86e
|
||||
clear e14c
|
||||
clear_all e0b8
|
||||
close e5cd
|
||||
closed_caption e01c
|
||||
cloud e2bd
|
||||
cloud_circle e2be
|
||||
cloud_done e2bf
|
||||
cloud_download e2c0
|
||||
cloud_off e2c1
|
||||
cloud_queue e2c2
|
||||
cloud_upload e2c3
|
||||
code e86f
|
||||
collections e3b6
|
||||
collections_bookmark e431
|
||||
color_lens e3b7
|
||||
colorize e3b8
|
||||
comment e0b9
|
||||
compare e3b9
|
||||
compare_arrows e915
|
||||
computer e30a
|
||||
confirmation_number e638
|
||||
contact_mail e0d0
|
||||
contact_phone e0cf
|
||||
contacts e0ba
|
||||
content_copy e14d
|
||||
content_cut e14e
|
||||
content_paste e14f
|
||||
control_point e3ba
|
||||
control_point_duplicate e3bb
|
||||
copyright e90c
|
||||
create e150
|
||||
create_new_folder e2cc
|
||||
credit_card e870
|
||||
crop e3be
|
||||
crop_16_9 e3bc
|
||||
crop_3_2 e3bd
|
||||
crop_5_4 e3bf
|
||||
crop_7_5 e3c0
|
||||
crop_din e3c1
|
||||
crop_free e3c2
|
||||
crop_landscape e3c3
|
||||
crop_original e3c4
|
||||
crop_portrait e3c5
|
||||
crop_rotate e437
|
||||
crop_square e3c6
|
||||
dashboard e871
|
||||
data_usage e1af
|
||||
date_range e916
|
||||
dehaze e3c7
|
||||
delete e872
|
||||
delete_forever e92b
|
||||
delete_sweep e16c
|
||||
description e873
|
||||
desktop_mac e30b
|
||||
desktop_windows e30c
|
||||
details e3c8
|
||||
developer_board e30d
|
||||
developer_mode e1b0
|
||||
device_hub e335
|
||||
devices e1b1
|
||||
devices_other e337
|
||||
dialer_sip e0bb
|
||||
dialpad e0bc
|
||||
directions e52e
|
||||
directions_bike e52f
|
||||
directions_boat e532
|
||||
directions_bus e530
|
||||
directions_car e531
|
||||
directions_railway e534
|
||||
directions_run e566
|
||||
directions_subway e533
|
||||
directions_transit e535
|
||||
directions_walk e536
|
||||
disc_full e610
|
||||
dns e875
|
||||
do_not_disturb e612
|
||||
do_not_disturb_alt e611
|
||||
do_not_disturb_off e643
|
||||
do_not_disturb_on e644
|
||||
dock e30e
|
||||
domain e7ee
|
||||
done e876
|
||||
done_all e877
|
||||
donut_large e917
|
||||
donut_small e918
|
||||
drafts e151
|
||||
drag_handle e25d
|
||||
drive_eta e613
|
||||
dvr e1b2
|
||||
edit e3c9
|
||||
edit_location e568
|
||||
eject e8fb
|
||||
email e0be
|
||||
enhanced_encryption e63f
|
||||
equalizer e01d
|
||||
error e000
|
||||
error_outline e001
|
||||
euro_symbol e926
|
||||
ev_station e56d
|
||||
event e878
|
||||
event_available e614
|
||||
event_busy e615
|
||||
event_note e616
|
||||
event_seat e903
|
||||
exit_to_app e879
|
||||
expand_less e5ce
|
||||
expand_more e5cf
|
||||
explicit e01e
|
||||
explore e87a
|
||||
exposure e3ca
|
||||
exposure_neg_1 e3cb
|
||||
exposure_neg_2 e3cc
|
||||
exposure_plus_1 e3cd
|
||||
exposure_plus_2 e3ce
|
||||
exposure_zero e3cf
|
||||
extension e87b
|
||||
face e87c
|
||||
fast_forward e01f
|
||||
fast_rewind e020
|
||||
favorite e87d
|
||||
favorite_border e87e
|
||||
featured_play_list e06d
|
||||
featured_video e06e
|
||||
feedback e87f
|
||||
fiber_dvr e05d
|
||||
fiber_manual_record e061
|
||||
fiber_new e05e
|
||||
fiber_pin e06a
|
||||
fiber_smart_record e062
|
||||
file_download e2c4
|
||||
file_upload e2c6
|
||||
filter e3d3
|
||||
filter_1 e3d0
|
||||
filter_2 e3d1
|
||||
filter_3 e3d2
|
||||
filter_4 e3d4
|
||||
filter_5 e3d5
|
||||
filter_6 e3d6
|
||||
filter_7 e3d7
|
||||
filter_8 e3d8
|
||||
filter_9 e3d9
|
||||
filter_9_plus e3da
|
||||
filter_b_and_w e3db
|
||||
filter_center_focus e3dc
|
||||
filter_drama e3dd
|
||||
filter_frames e3de
|
||||
filter_hdr e3df
|
||||
filter_list e152
|
||||
filter_none e3e0
|
||||
filter_tilt_shift e3e2
|
||||
filter_vintage e3e3
|
||||
find_in_page e880
|
||||
find_replace e881
|
||||
fingerprint e90d
|
||||
first_page e5dc
|
||||
fitness_center eb43
|
||||
flag e153
|
||||
flare e3e4
|
||||
flash_auto e3e5
|
||||
flash_off e3e6
|
||||
flash_on e3e7
|
||||
flight e539
|
||||
flight_land e904
|
||||
flight_takeoff e905
|
||||
flip e3e8
|
||||
flip_to_back e882
|
||||
flip_to_front e883
|
||||
folder e2c7
|
||||
folder_open e2c8
|
||||
folder_shared e2c9
|
||||
folder_special e617
|
||||
font_download e167
|
||||
format_align_center e234
|
||||
format_align_justify e235
|
||||
format_align_left e236
|
||||
format_align_right e237
|
||||
format_bold e238
|
||||
format_clear e239
|
||||
format_color_fill e23a
|
||||
format_color_reset e23b
|
||||
format_color_text e23c
|
||||
format_indent_decrease e23d
|
||||
format_indent_increase e23e
|
||||
format_italic e23f
|
||||
format_line_spacing e240
|
||||
format_list_bulleted e241
|
||||
format_list_numbered e242
|
||||
format_paint e243
|
||||
format_quote e244
|
||||
format_shapes e25e
|
||||
format_size e245
|
||||
format_strikethrough e246
|
||||
format_textdirection_l_to_r e247
|
||||
format_textdirection_r_to_l e248
|
||||
format_underlined e249
|
||||
forum e0bf
|
||||
forward e154
|
||||
forward_10 e056
|
||||
forward_30 e057
|
||||
forward_5 e058
|
||||
free_breakfast eb44
|
||||
fullscreen e5d0
|
||||
fullscreen_exit e5d1
|
||||
functions e24a
|
||||
g_translate e927
|
||||
gamepad e30f
|
||||
games e021
|
||||
gavel e90e
|
||||
gesture e155
|
||||
get_app e884
|
||||
gif e908
|
||||
golf_course eb45
|
||||
gps_fixed e1b3
|
||||
gps_not_fixed e1b4
|
||||
gps_off e1b5
|
||||
grade e885
|
||||
gradient e3e9
|
||||
grain e3ea
|
||||
graphic_eq e1b8
|
||||
grid_off e3eb
|
||||
grid_on e3ec
|
||||
group e7ef
|
||||
group_add e7f0
|
||||
group_work e886
|
||||
hd e052
|
||||
hdr_off e3ed
|
||||
hdr_on e3ee
|
||||
hdr_strong e3f1
|
||||
hdr_weak e3f2
|
||||
headset e310
|
||||
headset_mic e311
|
||||
healing e3f3
|
||||
hearing e023
|
||||
help e887
|
||||
help_outline e8fd
|
||||
high_quality e024
|
||||
highlight e25f
|
||||
highlight_off e888
|
||||
history e889
|
||||
home e88a
|
||||
hot_tub eb46
|
||||
hotel e53a
|
||||
hourglass_empty e88b
|
||||
hourglass_full e88c
|
||||
http e902
|
||||
https e88d
|
||||
image e3f4
|
||||
image_aspect_ratio e3f5
|
||||
import_contacts e0e0
|
||||
import_export e0c3
|
||||
important_devices e912
|
||||
inbox e156
|
||||
indeterminate_check_box e909
|
||||
info e88e
|
||||
info_outline e88f
|
||||
input e890
|
||||
insert_chart e24b
|
||||
insert_comment e24c
|
||||
insert_drive_file e24d
|
||||
insert_emoticon e24e
|
||||
insert_invitation e24f
|
||||
insert_link e250
|
||||
insert_photo e251
|
||||
invert_colors e891
|
||||
invert_colors_off e0c4
|
||||
iso e3f6
|
||||
keyboard e312
|
||||
keyboard_arrow_down e313
|
||||
keyboard_arrow_left e314
|
||||
keyboard_arrow_right e315
|
||||
keyboard_arrow_up e316
|
||||
keyboard_backspace e317
|
||||
keyboard_capslock e318
|
||||
keyboard_hide e31a
|
||||
keyboard_return e31b
|
||||
keyboard_tab e31c
|
||||
keyboard_voice e31d
|
||||
kitchen eb47
|
||||
label e892
|
||||
label_outline e893
|
||||
landscape e3f7
|
||||
language e894
|
||||
laptop e31e
|
||||
laptop_chromebook e31f
|
||||
laptop_mac e320
|
||||
laptop_windows e321
|
||||
last_page e5dd
|
||||
launch e895
|
||||
layers e53b
|
||||
layers_clear e53c
|
||||
leak_add e3f8
|
||||
leak_remove e3f9
|
||||
lens e3fa
|
||||
library_add e02e
|
||||
library_books e02f
|
||||
library_music e030
|
||||
lightbulb_outline e90f
|
||||
line_style e919
|
||||
line_weight e91a
|
||||
linear_scale e260
|
||||
link e157
|
||||
linked_camera e438
|
||||
list e896
|
||||
live_help e0c6
|
||||
live_tv e639
|
||||
local_activity e53f
|
||||
local_airport e53d
|
||||
local_atm e53e
|
||||
local_bar e540
|
||||
local_cafe e541
|
||||
local_car_wash e542
|
||||
local_convenience_store e543
|
||||
local_dining e556
|
||||
local_drink e544
|
||||
local_florist e545
|
||||
local_gas_station e546
|
||||
local_grocery_store e547
|
||||
local_hospital e548
|
||||
local_hotel e549
|
||||
local_laundry_service e54a
|
||||
local_library e54b
|
||||
local_mall e54c
|
||||
local_movies e54d
|
||||
local_offer e54e
|
||||
local_parking e54f
|
||||
local_pharmacy e550
|
||||
local_phone e551
|
||||
local_pizza e552
|
||||
local_play e553
|
||||
local_post_office e554
|
||||
local_printshop e555
|
||||
local_see e557
|
||||
local_shipping e558
|
||||
local_taxi e559
|
||||
location_city e7f1
|
||||
location_disabled e1b6
|
||||
location_off e0c7
|
||||
location_on e0c8
|
||||
location_searching e1b7
|
||||
lock e897
|
||||
lock_open e898
|
||||
lock_outline e899
|
||||
looks e3fc
|
||||
looks_3 e3fb
|
||||
looks_4 e3fd
|
||||
looks_5 e3fe
|
||||
looks_6 e3ff
|
||||
looks_one e400
|
||||
looks_two e401
|
||||
loop e028
|
||||
loupe e402
|
||||
low_priority e16d
|
||||
loyalty e89a
|
||||
mail e158
|
||||
mail_outline e0e1
|
||||
map e55b
|
||||
markunread e159
|
||||
markunread_mailbox e89b
|
||||
memory e322
|
||||
menu e5d2
|
||||
merge_type e252
|
||||
message e0c9
|
||||
mic e029
|
||||
mic_none e02a
|
||||
mic_off e02b
|
||||
mms e618
|
||||
mode_comment e253
|
||||
mode_edit e254
|
||||
monetization_on e263
|
||||
money_off e25c
|
||||
monochrome_photos e403
|
||||
mood e7f2
|
||||
mood_bad e7f3
|
||||
more e619
|
||||
more_horiz e5d3
|
||||
more_vert e5d4
|
||||
motorcycle e91b
|
||||
mouse e323
|
||||
move_to_inbox e168
|
||||
movie e02c
|
||||
movie_creation e404
|
||||
movie_filter e43a
|
||||
multiline_chart e6df
|
||||
music_note e405
|
||||
music_video e063
|
||||
my_location e55c
|
||||
nature e406
|
||||
nature_people e407
|
||||
navigate_before e408
|
||||
navigate_next e409
|
||||
navigation e55d
|
||||
near_me e569
|
||||
network_cell e1b9
|
||||
network_check e640
|
||||
network_locked e61a
|
||||
network_wifi e1ba
|
||||
new_releases e031
|
||||
next_week e16a
|
||||
nfc e1bb
|
||||
no_encryption e641
|
||||
no_sim e0cc
|
||||
not_interested e033
|
||||
note e06f
|
||||
note_add e89c
|
||||
notifications e7f4
|
||||
notifications_active e7f7
|
||||
notifications_none e7f5
|
||||
notifications_off e7f6
|
||||
notifications_paused e7f8
|
||||
offline_pin e90a
|
||||
ondemand_video e63a
|
||||
opacity e91c
|
||||
open_in_browser e89d
|
||||
open_in_new e89e
|
||||
open_with e89f
|
||||
pages e7f9
|
||||
pageview e8a0
|
||||
palette e40a
|
||||
pan_tool e925
|
||||
panorama e40b
|
||||
panorama_fish_eye e40c
|
||||
panorama_horizontal e40d
|
||||
panorama_vertical e40e
|
||||
panorama_wide_angle e40f
|
||||
party_mode e7fa
|
||||
pause e034
|
||||
pause_circle_filled e035
|
||||
pause_circle_outline e036
|
||||
payment e8a1
|
||||
people e7fb
|
||||
people_outline e7fc
|
||||
perm_camera_mic e8a2
|
||||
perm_contact_calendar e8a3
|
||||
perm_data_setting e8a4
|
||||
perm_device_information e8a5
|
||||
perm_identity e8a6
|
||||
perm_media e8a7
|
||||
perm_phone_msg e8a8
|
||||
perm_scan_wifi e8a9
|
||||
person e7fd
|
||||
person_add e7fe
|
||||
person_outline e7ff
|
||||
person_pin e55a
|
||||
person_pin_circle e56a
|
||||
personal_video e63b
|
||||
pets e91d
|
||||
phone e0cd
|
||||
phone_android e324
|
||||
phone_bluetooth_speaker e61b
|
||||
phone_forwarded e61c
|
||||
phone_in_talk e61d
|
||||
phone_iphone e325
|
||||
phone_locked e61e
|
||||
phone_missed e61f
|
||||
phone_paused e620
|
||||
phonelink e326
|
||||
phonelink_erase e0db
|
||||
phonelink_lock e0dc
|
||||
phonelink_off e327
|
||||
phonelink_ring e0dd
|
||||
phonelink_setup e0de
|
||||
photo e410
|
||||
photo_album e411
|
||||
photo_camera e412
|
||||
photo_filter e43b
|
||||
photo_library e413
|
||||
photo_size_select_actual e432
|
||||
photo_size_select_large e433
|
||||
photo_size_select_small e434
|
||||
picture_as_pdf e415
|
||||
picture_in_picture e8aa
|
||||
picture_in_picture_alt e911
|
||||
pie_chart e6c4
|
||||
pie_chart_outlined e6c5
|
||||
pin_drop e55e
|
||||
place e55f
|
||||
play_arrow e037
|
||||
play_circle_filled e038
|
||||
play_circle_outline e039
|
||||
play_for_work e906
|
||||
playlist_add e03b
|
||||
playlist_add_check e065
|
||||
playlist_play e05f
|
||||
plus_one e800
|
||||
poll e801
|
||||
polymer e8ab
|
||||
pool eb48
|
||||
portable_wifi_off e0ce
|
||||
portrait e416
|
||||
power e63c
|
||||
power_input e336
|
||||
power_settings_new e8ac
|
||||
pregnant_woman e91e
|
||||
present_to_all e0df
|
||||
print e8ad
|
||||
priority_high e645
|
||||
public e80b
|
||||
publish e255
|
||||
query_builder e8ae
|
||||
question_answer e8af
|
||||
queue e03c
|
||||
queue_music e03d
|
||||
queue_play_next e066
|
||||
radio e03e
|
||||
radio_button_checked e837
|
||||
radio_button_unchecked e836
|
||||
rate_review e560
|
||||
receipt e8b0
|
||||
recent_actors e03f
|
||||
record_voice_over e91f
|
||||
redeem e8b1
|
||||
redo e15a
|
||||
refresh e5d5
|
||||
remove e15b
|
||||
remove_circle e15c
|
||||
remove_circle_outline e15d
|
||||
remove_from_queue e067
|
||||
remove_red_eye e417
|
||||
remove_shopping_cart e928
|
||||
reorder e8fe
|
||||
repeat e040
|
||||
repeat_one e041
|
||||
replay e042
|
||||
replay_10 e059
|
||||
replay_30 e05a
|
||||
replay_5 e05b
|
||||
reply e15e
|
||||
reply_all e15f
|
||||
report e160
|
||||
report_problem e8b2
|
||||
restaurant e56c
|
||||
restaurant_menu e561
|
||||
restore e8b3
|
||||
restore_page e929
|
||||
ring_volume e0d1
|
||||
room e8b4
|
||||
room_service eb49
|
||||
rotate_90_degrees_ccw e418
|
||||
rotate_left e419
|
||||
rotate_right e41a
|
||||
rounded_corner e920
|
||||
router e328
|
||||
rowing e921
|
||||
rss_feed e0e5
|
||||
rv_hookup e642
|
||||
satellite e562
|
||||
save e161
|
||||
scanner e329
|
||||
schedule e8b5
|
||||
school e80c
|
||||
screen_lock_landscape e1be
|
||||
screen_lock_portrait e1bf
|
||||
screen_lock_rotation e1c0
|
||||
screen_rotation e1c1
|
||||
screen_share e0e2
|
||||
sd_card e623
|
||||
sd_storage e1c2
|
||||
search e8b6
|
||||
security e32a
|
||||
select_all e162
|
||||
send e163
|
||||
sentiment_dissatisfied e811
|
||||
sentiment_neutral e812
|
||||
sentiment_satisfied e813
|
||||
sentiment_very_dissatisfied e814
|
||||
sentiment_very_satisfied e815
|
||||
settings e8b8
|
||||
settings_applications e8b9
|
||||
settings_backup_restore e8ba
|
||||
settings_bluetooth e8bb
|
||||
settings_brightness e8bd
|
||||
settings_cell e8bc
|
||||
settings_ethernet e8be
|
||||
settings_input_antenna e8bf
|
||||
settings_input_component e8c0
|
||||
settings_input_composite e8c1
|
||||
settings_input_hdmi e8c2
|
||||
settings_input_svideo e8c3
|
||||
settings_overscan e8c4
|
||||
settings_phone e8c5
|
||||
settings_power e8c6
|
||||
settings_remote e8c7
|
||||
settings_system_daydream e1c3
|
||||
settings_voice e8c8
|
||||
share e80d
|
||||
shop e8c9
|
||||
shop_two e8ca
|
||||
shopping_basket e8cb
|
||||
shopping_cart e8cc
|
||||
short_text e261
|
||||
show_chart e6e1
|
||||
shuffle e043
|
||||
signal_cellular_4_bar e1c8
|
||||
signal_cellular_connected_no_internet_4_bar e1cd
|
||||
signal_cellular_no_sim e1ce
|
||||
signal_cellular_null e1cf
|
||||
signal_cellular_off e1d0
|
||||
signal_wifi_4_bar e1d8
|
||||
signal_wifi_4_bar_lock e1d9
|
||||
signal_wifi_off e1da
|
||||
sim_card e32b
|
||||
sim_card_alert e624
|
||||
skip_next e044
|
||||
skip_previous e045
|
||||
slideshow e41b
|
||||
slow_motion_video e068
|
||||
smartphone e32c
|
||||
smoke_free eb4a
|
||||
smoking_rooms eb4b
|
||||
sms e625
|
||||
sms_failed e626
|
||||
snooze e046
|
||||
sort e164
|
||||
sort_by_alpha e053
|
||||
spa eb4c
|
||||
space_bar e256
|
||||
speaker e32d
|
||||
speaker_group e32e
|
||||
speaker_notes e8cd
|
||||
speaker_notes_off e92a
|
||||
speaker_phone e0d2
|
||||
spellcheck e8ce
|
||||
star e838
|
||||
star_border e83a
|
||||
star_half e839
|
||||
stars e8d0
|
||||
stay_current_landscape e0d3
|
||||
stay_current_portrait e0d4
|
||||
stay_primary_landscape e0d5
|
||||
stay_primary_portrait e0d6
|
||||
stop e047
|
||||
stop_screen_share e0e3
|
||||
storage e1db
|
||||
store e8d1
|
||||
store_mall_directory e563
|
||||
straighten e41c
|
||||
streetview e56e
|
||||
strikethrough_s e257
|
||||
style e41d
|
||||
subdirectory_arrow_left e5d9
|
||||
subdirectory_arrow_right e5da
|
||||
subject e8d2
|
||||
subscriptions e064
|
||||
subtitles e048
|
||||
subway e56f
|
||||
supervisor_account e8d3
|
||||
surround_sound e049
|
||||
swap_calls e0d7
|
||||
swap_horiz e8d4
|
||||
swap_vert e8d5
|
||||
swap_vertical_circle e8d6
|
||||
switch_camera e41e
|
||||
switch_video e41f
|
||||
sync e627
|
||||
sync_disabled e628
|
||||
sync_problem e629
|
||||
system_update e62a
|
||||
system_update_alt e8d7
|
||||
tab e8d8
|
||||
tab_unselected e8d9
|
||||
tablet e32f
|
||||
tablet_android e330
|
||||
tablet_mac e331
|
||||
tag_faces e420
|
||||
tap_and_play e62b
|
||||
terrain e564
|
||||
text_fields e262
|
||||
text_format e165
|
||||
textsms e0d8
|
||||
texture e421
|
||||
theaters e8da
|
||||
thumb_down e8db
|
||||
thumb_up e8dc
|
||||
thumbs_up_down e8dd
|
||||
time_to_leave e62c
|
||||
timelapse e422
|
||||
timeline e922
|
||||
timer e425
|
||||
timer_10 e423
|
||||
timer_3 e424
|
||||
timer_off e426
|
||||
title e264
|
||||
toc e8de
|
||||
today e8df
|
||||
toll e8e0
|
||||
tonality e427
|
||||
touch_app e913
|
||||
toys e332
|
||||
track_changes e8e1
|
||||
traffic e565
|
||||
train e570
|
||||
tram e571
|
||||
transfer_within_a_station e572
|
||||
transform e428
|
||||
translate e8e2
|
||||
trending_down e8e3
|
||||
trending_flat e8e4
|
||||
trending_up e8e5
|
||||
tune e429
|
||||
turned_in e8e6
|
||||
turned_in_not e8e7
|
||||
tv e333
|
||||
unarchive e169
|
||||
undo e166
|
||||
unfold_less e5d6
|
||||
unfold_more e5d7
|
||||
update e923
|
||||
usb e1e0
|
||||
verified_user e8e8
|
||||
vertical_align_bottom e258
|
||||
vertical_align_center e259
|
||||
vertical_align_top e25a
|
||||
vibration e62d
|
||||
video_call e070
|
||||
video_label e071
|
||||
video_library e04a
|
||||
videocam e04b
|
||||
videocam_off e04c
|
||||
videogame_asset e338
|
||||
view_agenda e8e9
|
||||
view_array e8ea
|
||||
view_carousel e8eb
|
||||
view_column e8ec
|
||||
view_comfy e42a
|
||||
view_compact e42b
|
||||
view_day e8ed
|
||||
view_headline e8ee
|
||||
view_list e8ef
|
||||
view_module e8f0
|
||||
view_quilt e8f1
|
||||
view_stream e8f2
|
||||
view_week e8f3
|
||||
vignette e435
|
||||
visibility e8f4
|
||||
visibility_off e8f5
|
||||
voice_chat e62e
|
||||
voicemail e0d9
|
||||
volume_down e04d
|
||||
volume_mute e04e
|
||||
volume_off e04f
|
||||
volume_up e050
|
||||
vpn_key e0da
|
||||
vpn_lock e62f
|
||||
wallpaper e1bc
|
||||
warning e002
|
||||
watch e334
|
||||
watch_later e924
|
||||
wb_auto e42c
|
||||
wb_cloudy e42d
|
||||
wb_incandescent e42e
|
||||
wb_iridescent e436
|
||||
wb_sunny e430
|
||||
wc e63d
|
||||
web e051
|
||||
web_asset e069
|
||||
weekend e16b
|
||||
whatshot e80e
|
||||
widgets e1bd
|
||||
wifi e63e
|
||||
wifi_lock e1e1
|
||||
wifi_tethering e1e2
|
||||
work e8f9
|
||||
wrap_text e25b
|
||||
youtube_searched_for e8fa
|
||||
zoom_in e8ff
|
||||
zoom_out e900
|
||||
zoom_out_map e56b
|
||||
@@ -0,0 +1,36 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url(MaterialIcons-Regular.woff2) format('woff2'),
|
||||
url(MaterialIcons-Regular.woff) format('woff'),
|
||||
url(MaterialIcons-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
@@ -1,41 +1,72 @@
|
||||
const {src, dest, parallel} = require('gulp');
|
||||
const uglify = require('gulp-uglify');
|
||||
const rename = require('gulp-rename');
|
||||
const concat = require('gulp-concat');
|
||||
const { src, dest, parallel } = require('gulp')
|
||||
const uglify = require('gulp-uglify')
|
||||
const rename = require('gulp-rename')
|
||||
const concat = require('gulp-concat')
|
||||
const replace = require('gulp-replace')
|
||||
const prettier = require('gulp-prettier')
|
||||
|
||||
function vendors() {
|
||||
return src([
|
||||
'./node_modules/optimal-select/dist/optimal-select.js',
|
||||
'./node_modules/hammerjs/hammer.js',
|
||||
'./node_modules/propagating-hammerjs/propagating.js',
|
||||
'./node_modules/highlight.js/lib/highlight.js',
|
||||
'./node_modules/pixi.js/dist/pixi.js',
|
||||
'./node_modules/pixi-compressed-textures/lib/crn_decomp.js',
|
||||
'./node_modules/pixi-compressed-textures/bin/pixi-compressed-textures.js',
|
||||
'./node_modules/pixi-filters/dist/pixi-filters.js',
|
||||
'./node_modules/pixi-particles/dist/pixi-particles.js',
|
||||
'./node_modules/pixi-projection/dist/pixi-projection.js',
|
||||
'./node_modules/gsap/src/uncompressed/TweenLite.js',
|
||||
'./lib/3rdparty/convertPointFromPageToNode.js',
|
||||
], {sourcemaps: false})
|
||||
return src(
|
||||
[
|
||||
'./node_modules/optimal-select/dist/optimal-select.js',
|
||||
'./node_modules/hammerjs/hammer.js',
|
||||
'./node_modules/propagating-hammerjs/propagating.js',
|
||||
'./node_modules/pixi.js/dist/pixi.js',
|
||||
'./node_modules/pixi-compressed-textures/lib/crn_decomp.js',
|
||||
'./node_modules/pixi-compressed-textures/dist/pixi-compressed-textures.js',
|
||||
'./node_modules/pixi-filters/dist/pixi-filters.js',
|
||||
'./node_modules/pixi-particles/dist/pixi-particles.js',
|
||||
'./node_modules/pixi-projection/dist/pixi-projection.js',
|
||||
'./node_modules/gsap/src/uncompressed/TweenMax.js',
|
||||
'./node_modules/gsap/src/uncompressed/TimelineMax.js',
|
||||
'./lib/3rdparty/jquery.js',
|
||||
'./lib/3rdparty/pixi-ease.js',
|
||||
'./lib/3rdparty/pixi-viewport.js',
|
||||
'./lib/3rdparty/convertPointFromPageToNode.js',
|
||||
'./lib/3rdparty/jquery.hypher.js',
|
||||
'./lib/3rdparty/hyphenation/de.js',
|
||||
'./lib/3rdparty/hyphenation/en-gb.js'
|
||||
],
|
||||
{ sourcemaps: false }
|
||||
)
|
||||
.pipe(concat('iwmlib.3rdparty.js'))
|
||||
.pipe(dest('dist', {sourcemaps: false}))
|
||||
.pipe(rename({extname: '.min.js'}))
|
||||
.pipe(replace(/^\/\/# sourceMappingURL=.*$/gim, ''))
|
||||
.pipe(dest('dist', { sourcemaps: false }))
|
||||
.pipe(rename({ extname: '.min.js' }))
|
||||
.pipe(uglify())
|
||||
.pipe(dest('dist', {sourcemaps: false}))
|
||||
.pipe(dest('dist', { sourcemaps: false }))
|
||||
}
|
||||
|
||||
function preload() {
|
||||
return src([
|
||||
'./node_modules/highlight.js/lib/highlight.js',
|
||||
'./node_modules/gsap/src/uncompressed/TweenLite.js',
|
||||
'./lib/3rdparty/convertPointFromPageToNode.js',
|
||||
], {sourcemaps: false})
|
||||
return src(['./node_modules/gsap/src/uncompressed/TweenMax.js', './lib/3rdparty/convertPointFromPageToNode.js'], {
|
||||
sourcemaps: false
|
||||
})
|
||||
.pipe(concat('iwmlib.3rdparty.preload.js'))
|
||||
.pipe(dest('dist', {sourcemaps: false}))
|
||||
.pipe(rename({extname: '.min.js'}))
|
||||
.pipe(replace(/^\/\/# sourceMappingURL=.*$/gim, ''))
|
||||
.pipe(dest('dist', { sourcemaps: false }))
|
||||
.pipe(rename({ extname: '.min.js' }))
|
||||
.pipe(uglify())
|
||||
.pipe(dest('dist', {sourcemaps: false}))
|
||||
.pipe(dest('dist', { sourcemaps: false }))
|
||||
}
|
||||
|
||||
exports.default = parallel(vendors, preload);
|
||||
function prettify() {
|
||||
return src(
|
||||
['./lib/*.js', './lib/card/*.js', './lib/pixi/*.js', './lib/pixi/deepzoom/*.js', '!./lib/bootstrap.babel.js'],
|
||||
{
|
||||
base: './lib'
|
||||
}
|
||||
)
|
||||
.pipe(
|
||||
prettier({
|
||||
singleQuote: true,
|
||||
jsxSingleQuote: true,
|
||||
tabWidth: 4,
|
||||
semi: false,
|
||||
printWidth: 120
|
||||
})
|
||||
)
|
||||
.pipe(dest('./lib'))
|
||||
}
|
||||
|
||||
exports.prettify = prettify
|
||||
exports.default = parallel(vendors, preload)
|
||||
|
||||
@@ -80,4 +80,4 @@
|
||||
getTransformationMatrix(element))
|
||||
}
|
||||
|
||||
}())
|
||||
}());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.1.9
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.1.11
|
||||
* DATE: 2019-05-16
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -720,7 +720,7 @@ TweenPlugin.activate([CSSPlugin, AttrPlugin]); // to ensure treeshaking doesn't
|
||||
record("out", outProgress);
|
||||
}
|
||||
startTime = 0;
|
||||
maxDuration = Math.min(1000, vars.maxDuration || 1000, _getClippedDuration(selectedAnimation));
|
||||
maxDuration = vars.maxDuration || Math.min(1000, _getClippedDuration(selectedAnimation));
|
||||
if (selectedAnimation === _recordedRoot || vars.globalSync !== false) {
|
||||
_merge();
|
||||
linkedAnimation = _rootTween;
|
||||
@@ -1105,7 +1105,7 @@ TweenPlugin.activate([CSSPlugin, AttrPlugin]); // to ensure treeshaking doesn't
|
||||
|
||||
|
||||
|
||||
GSDevTools.version = "0.1.9";
|
||||
GSDevTools.version = "0.1.11";
|
||||
GSDevTools.logOverwrites = false;
|
||||
GSDevTools.globalRecordingTime = 2;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.9.0
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.9.1
|
||||
* DATE: 2019-02-21
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -903,11 +903,11 @@ import { _gsScope } from "gsap/TweenLite.js";
|
||||
propName: "morphSVG",
|
||||
API: 2,
|
||||
global: true,
|
||||
version: "0.9.0",
|
||||
version: "0.9.1",
|
||||
|
||||
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
||||
init: function(target, value, tween, index) {
|
||||
var cs = window.getComputedStyle(target),
|
||||
var cs = target.nodeType ? window.getComputedStyle(target) : {},
|
||||
fill = cs.fill + "",
|
||||
fillSafe = !(fill === "none" || (fill.match(_numbersExp) || [])[3] === "0" || cs.fillRule === "evenodd"),
|
||||
origins = (value.origin || "50 50").split(","),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.1.9
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.1.11
|
||||
* DATE: 2019-05-16
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -717,7 +717,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
record("out", outProgress);
|
||||
}
|
||||
startTime = 0;
|
||||
maxDuration = Math.min(1000, vars.maxDuration || 1000, _getClippedDuration(selectedAnimation));
|
||||
maxDuration = vars.maxDuration || Math.min(1000, _getClippedDuration(selectedAnimation));
|
||||
if (selectedAnimation === _recordedRoot || vars.globalSync !== false) {
|
||||
_merge();
|
||||
linkedAnimation = _rootTween;
|
||||
@@ -1102,7 +1102,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
|
||||
|
||||
|
||||
GSDevTools.version = "0.1.9";
|
||||
GSDevTools.version = "0.1.11";
|
||||
GSDevTools.logOverwrites = false;
|
||||
GSDevTools.globalRecordingTime = 2;
|
||||
|
||||
@@ -2986,7 +2986,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
if (e && e.target) {
|
||||
_addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"
|
||||
}
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables !== false && !force);
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables === false && !force);
|
||||
if (isClicking) {
|
||||
_addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.
|
||||
_dispatchEvent(self, "pressInit", "onPressInit");
|
||||
@@ -3689,7 +3689,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
p.constructor = Draggable;
|
||||
p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
|
||||
p.isDragging = p.isPressed = false;
|
||||
Draggable.version = "0.17.0";
|
||||
Draggable.version = "0.17.1";
|
||||
Draggable.zIndex = 1000;
|
||||
|
||||
_addListener(_doc, "touchcancel", function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.9.0
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.9.1
|
||||
* DATE: 2019-02-21
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -906,12 +906,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
propName: "morphSVG",
|
||||
API: 2,
|
||||
global: true,
|
||||
version: "0.9.0",
|
||||
version: "0.9.1",
|
||||
overwriteProps: ["morphSVG"],
|
||||
|
||||
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
||||
init: function(target, value, tween, index) {
|
||||
var cs = window.getComputedStyle(target),
|
||||
var cs = target.nodeType ? window.getComputedStyle(target) : {},
|
||||
fill = cs.fill + "",
|
||||
fillSafe = !(fill === "none" || (fill.match(_numbersExp) || [])[3] === "0" || cs.fillRule === "evenodd"),
|
||||
origins = (value.origin || "50 50").split(","),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 1.3.8
|
||||
* DATE: 2018-05-30
|
||||
* VERSION: 1.3.9
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -312,7 +312,7 @@ import { _gsScope } from "./TweenLite.js";
|
||||
BezierPlugin = _gsScope._gsDefine.plugin({
|
||||
propName: "bezier",
|
||||
priority: -1,
|
||||
version: "1.3.8",
|
||||
version: "1.3.9",
|
||||
API: 2,
|
||||
global:true,
|
||||
|
||||
@@ -389,26 +389,26 @@ import { _gsScope } from "./TweenLite.js";
|
||||
func = this._func,
|
||||
target = this._target,
|
||||
notStart = (v !== this._startRatio),
|
||||
curIndex, inv, i, p, b, t, val, l, lengths, curSeg;
|
||||
curIndex, inv, i, p, b, t, val, l, lengths, curSeg, v1;
|
||||
if (!this._timeRes) {
|
||||
curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;
|
||||
t = (v - (curIndex * (1 / segments))) * segments;
|
||||
} else {
|
||||
lengths = this._lengths;
|
||||
curSeg = this._curSeg;
|
||||
v *= this._length;
|
||||
v1 = v * this._length;
|
||||
i = this._li;
|
||||
//find the appropriate segment (if the currently cached one isn't correct)
|
||||
if (v > this._l2 && i < segments - 1) {
|
||||
if (v1 > this._l2 && i < segments - 1) {
|
||||
l = segments - 1;
|
||||
while (i < l && (this._l2 = lengths[++i]) <= v) { }
|
||||
while (i < l && (this._l2 = lengths[++i]) <= v1) { }
|
||||
this._l1 = lengths[i-1];
|
||||
this._li = i;
|
||||
this._curSeg = curSeg = this._segments[i];
|
||||
this._s2 = curSeg[(this._s1 = this._si = 0)];
|
||||
} else if (v < this._l1 && i > 0) {
|
||||
while (i > 0 && (this._l1 = lengths[--i]) >= v) { }
|
||||
if (i === 0 && v < this._l1) {
|
||||
} else if (v1 < this._l1 && i > 0) {
|
||||
while (i > 0 && (this._l1 = lengths[--i]) >= v1) { }
|
||||
if (i === 0 && v1 < this._l1) {
|
||||
this._l1 = 0;
|
||||
} else {
|
||||
i++;
|
||||
@@ -421,16 +421,16 @@ import { _gsScope } from "./TweenLite.js";
|
||||
}
|
||||
curIndex = i;
|
||||
//now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)
|
||||
v -= this._l1;
|
||||
v1 -= this._l1;
|
||||
i = this._si;
|
||||
if (v > this._s2 && i < curSeg.length - 1) {
|
||||
if (v1 > this._s2 && i < curSeg.length - 1) {
|
||||
l = curSeg.length - 1;
|
||||
while (i < l && (this._s2 = curSeg[++i]) <= v) { }
|
||||
while (i < l && (this._s2 = curSeg[++i]) <= v1) { }
|
||||
this._s1 = curSeg[i-1];
|
||||
this._si = i;
|
||||
} else if (v < this._s1 && i > 0) {
|
||||
while (i > 0 && (this._s1 = curSeg[--i]) >= v) { }
|
||||
if (i === 0 && v < this._s1) {
|
||||
} else if (v1 < this._s1 && i > 0) {
|
||||
while (i > 0 && (this._s1 = curSeg[--i]) >= v1) { }
|
||||
if (i === 0 && v1 < this._s1) {
|
||||
this._s1 = 0;
|
||||
} else {
|
||||
i++;
|
||||
@@ -438,7 +438,7 @@ import { _gsScope } from "./TweenLite.js";
|
||||
this._s2 = curSeg[i];
|
||||
this._si = i;
|
||||
}
|
||||
t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
||||
t = (v === 1) ? 1 : ((i + (v1 - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
||||
}
|
||||
inv = 1 - t;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -30,7 +30,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
p = CSSPlugin.prototype = new TweenPlugin("css");
|
||||
|
||||
p.constructor = CSSPlugin;
|
||||
CSSPlugin.version = "2.1.0";
|
||||
CSSPlugin.version = "2.1.3";
|
||||
CSSPlugin.API = 2;
|
||||
CSSPlugin.defaultTransformPerspective = 0;
|
||||
CSSPlugin.defaultSkewType = "compensated";
|
||||
@@ -42,6 +42,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g,
|
||||
_relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
|
||||
_valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
||||
_valuesExpWithCommas = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b),?/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
||||
_NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=
|
||||
_suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,
|
||||
_opacityExp = /opacity *= *([^)]*)/i,
|
||||
@@ -63,7 +64,8 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
_dummyElement = {style:{}},
|
||||
_doc = _gsScope.document || {createElement: function() {return _dummyElement;}},
|
||||
_createElement = function(type, ns) {
|
||||
return (ns && _doc.createElementNS) ? _doc.createElementNS(ns, type) : _doc.createElement(type);
|
||||
var e = _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
|
||||
return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).
|
||||
},
|
||||
_tempDiv = _createElement("div"),
|
||||
_tempImg = _createElement("img"),
|
||||
@@ -643,14 +645,14 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
}
|
||||
return a.join(",");
|
||||
}
|
||||
vals = v.match(_valuesExp) || [];
|
||||
vals = v.match(delim === "," ? _valuesExp : _valuesExpWithCommas) || [];
|
||||
i = vals.length;
|
||||
if (numVals > i--) {
|
||||
while (++i < numVals) {
|
||||
vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
|
||||
}
|
||||
}
|
||||
return pfx + vals.join(delim) + sfx;
|
||||
return ((pfx && v !== "none") ? v.substr(0, v.indexOf(vals[0])) || pfx : pfx) + vals.join(delim) + sfx; //note: prefix might be different, like for clipPath it could start with inset( or polygon(
|
||||
};
|
||||
return formatter;
|
||||
},
|
||||
@@ -1233,7 +1235,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
//IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element
|
||||
var force = _ieVers || (/Android/i.test(_agent) && !_gsScope.chrome),
|
||||
svg, rect, width;
|
||||
if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway
|
||||
if (_doc.createElementNS && _docElement.appendChild && !force) { //IE8 and earlier doesn't support SVG anyway
|
||||
svg = _createSVG("svg", _docElement);
|
||||
rect = _createSVG("rect", svg, {width:100, height:50, x:100});
|
||||
width = rect.getBoundingClientRect().width;
|
||||
@@ -1351,7 +1353,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
|
||||
}
|
||||
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
||||
if (_transformProp && isDefault && !e.offsetParent) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
||||
if (_transformProp && isDefault && !e.offsetParent && e !== _docElement) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
||||
//browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
|
||||
n = style.display;
|
||||
style.display = "block";
|
||||
@@ -2113,7 +2115,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
}, allowFunc:true, prefix:true});
|
||||
|
||||
_registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});
|
||||
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0px)", prefix:true, multi:true, formatter:_getFormatter("inset(0px 0px 0px 0px)", false, true)});
|
||||
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0%)", prefix:true, multi:true, formatter:_getFormatter("inset(0% 0% 0% 0%)", false, true)});
|
||||
|
||||
_registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
|
||||
e = this.format(e);
|
||||
@@ -2367,7 +2369,9 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
|
||||
difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
|
||||
t.setAttribute("class", b);
|
||||
pt.data = difData.firstMPT;
|
||||
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
||||
if (t.style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
|
||||
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
||||
}
|
||||
pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
|
||||
return pt;
|
||||
}});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.6.7
|
||||
* DATE: 2018-08-27
|
||||
* VERSION: 0.6.8
|
||||
* DATE: 2019-02-22
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -27,7 +27,7 @@ _gsScope._gsDefine("plugins.CSSRulePlugin", ["plugins.TweenPlugin","TweenLite","
|
||||
|
||||
p._propName = "cssRule";
|
||||
p.constructor = CSSRulePlugin;
|
||||
CSSRulePlugin.version = "0.6.7";
|
||||
CSSRulePlugin.version = "0.6.8";
|
||||
CSSRulePlugin.API = 2;
|
||||
|
||||
/**
|
||||
@@ -93,7 +93,12 @@ _gsScope._gsDefine("plugins.CSSRulePlugin", ["plugins.TweenPlugin","TweenLite","
|
||||
// @private gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.
|
||||
p.setRatio = function(v) {
|
||||
_superSetRatio.call(this, v);
|
||||
this._ss.cssText = this._proxy.cssText;
|
||||
var proxy = this._proxy,
|
||||
ss = this._ss,
|
||||
i = proxy.length;
|
||||
while (--i > -1) {
|
||||
ss[proxy[i]] = proxy[proxy[i]];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.17.0
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.17.1
|
||||
* DATE: 2019-02-28
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
|
||||
@@ -1695,7 +1695,7 @@ import CSSPlugin from "./CSSPlugin.js";
|
||||
if (e && e.target) {
|
||||
_addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"
|
||||
}
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables !== false && !force);
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables === false && !force);
|
||||
if (isClicking) {
|
||||
_addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.
|
||||
_dispatchEvent(self, "pressInit", "onPressInit");
|
||||
@@ -2398,7 +2398,7 @@ import CSSPlugin from "./CSSPlugin.js";
|
||||
p.constructor = Draggable;
|
||||
p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
|
||||
p.isDragging = p.isPressed = false;
|
||||
Draggable.version = "0.17.0";
|
||||
Draggable.version = "0.17.1";
|
||||
Draggable.zIndex = 1000;
|
||||
|
||||
_addListener(_doc, "touchcancel", function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.2.1
|
||||
* DATE: 2018-05-30
|
||||
* VERSION: 0.3.0
|
||||
* DATE: 2019-05-13
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -389,13 +389,14 @@ import { _gsScope } from "./TweenLite.js";
|
||||
priority: 0,
|
||||
API: 2,
|
||||
global: true,
|
||||
version: "0.2.1",
|
||||
version: "0.3.0",
|
||||
|
||||
init: function (target, values, tween, index) {
|
||||
if (!target instanceof _gsScope.PIXI.DisplayObject) {
|
||||
return false;
|
||||
}
|
||||
var context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data, pt;
|
||||
var isV4 = _gsScope.PIXI.VERSION.charAt(0) === "4",
|
||||
context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data, pt;
|
||||
for (p in values) {
|
||||
context = _contexts[p];
|
||||
value = values[p];
|
||||
@@ -431,12 +432,12 @@ import { _gsScope } from "./TweenLite.js";
|
||||
colorSetter = _buildColorSetter(tween, this);
|
||||
}
|
||||
if ((p === "lineColor" || p === "fillColor") && target instanceof _gsScope.PIXI.Graphics) {
|
||||
data = target.graphicsData;
|
||||
data = (target.geometry || target).graphicsData; //"geometry" was introduced in PIXI version 5
|
||||
i = data.length;
|
||||
while (--i > -1) {
|
||||
_addColorTween(data[i], p, value, colorSetter, this);
|
||||
_addColorTween(isV4 ? data[i] : data[i][p.substr(0, 4) + "Style"], isV4 ? p : "color", value, colorSetter, this);
|
||||
}
|
||||
colorSetter.graphics = target;
|
||||
colorSetter.graphics = target.geometry || target;
|
||||
} else {
|
||||
_addColorTween(target, p, value, colorSetter, this);
|
||||
}
|
||||
@@ -460,5 +461,8 @@ import { _gsScope } from "./TweenLite.js";
|
||||
PixiPlugin.parseColor = _parseColor;
|
||||
PixiPlugin.formatColors = _formatColors;
|
||||
PixiPlugin.colorStringFilter = _colorStringFilter;
|
||||
PixiPlugin.registerPIXI = function(PIXI) {
|
||||
_gsScope.PIXI = PIXI;
|
||||
};
|
||||
|
||||
export { PixiPlugin, PixiPlugin as default };
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -70,16 +70,16 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
_defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true
|
||||
var ir = "immediateRender";
|
||||
if (!(ir in toVars)) {
|
||||
toVars[ir] = !(tl._paused || (fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
}
|
||||
return toVars;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -116,15 +116,16 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
p = TimelineLite.prototype = new SimpleTimeline();
|
||||
|
||||
TimelineLite.version = "2.1.0";
|
||||
TimelineLite.version = "2.1.3";
|
||||
TimelineLite.distribute = _distribute;
|
||||
p.constructor = TimelineLite;
|
||||
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
||||
@@ -441,6 +442,29 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
||||
time += self._time - prevTime;
|
||||
}
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time > prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - time : time) / self._timeScale;
|
||||
}
|
||||
}
|
||||
if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts.
|
||||
self._totalTime = self._time = totalDur;
|
||||
if (!self._reversed) if (!self._hasPausedChild()) {
|
||||
@@ -493,31 +517,6 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time >= prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (time / self._timeScale);
|
||||
}
|
||||
}
|
||||
|
||||
self._totalTime = self._time = self._rawPrevTime = time;
|
||||
}
|
||||
if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -34,7 +34,7 @@ _gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], fu
|
||||
|
||||
p.constructor = TimelineMax;
|
||||
p.kill()._gc = false;
|
||||
TimelineMax.version = "2.1.0";
|
||||
TimelineMax.version = "2.1.3";
|
||||
|
||||
p.invalidate = function() {
|
||||
this._yoyo = !!this.vars.yoyo;
|
||||
@@ -210,35 +210,34 @@ _gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], fu
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
time = self._time;
|
||||
if (time >= prevTime || (self._repeat && prevCycle !== self._cycle)) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
time = self._time;
|
||||
if (time > prevTime || (self._repeat && prevCycle !== self._cycle)) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
if (pauseTween) {
|
||||
pauseTime = self._startTime + (pauseTween._startTime / self._timeScale);
|
||||
if (pauseTween._startTime < dur) {
|
||||
self._time = self._rawPrevTime = time = pauseTween._startTime;
|
||||
self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay));
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - pauseTween._startTime : pauseTween._startTime) / self._timeScale;
|
||||
if (pauseTween._startTime < dur) {
|
||||
self._time = self._rawPrevTime = time = pauseTween._startTime;
|
||||
self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (self._cycle !== prevCycle) if (!self._locked) {
|
||||
@@ -477,7 +476,7 @@ _gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], fu
|
||||
}
|
||||
var duration = this._duration,
|
||||
cycle = this._cycle,
|
||||
cycleDur = cycle * (duration * this._repeatDelay);
|
||||
cycleDur = cycle * (duration + this._repeatDelay);
|
||||
if (value > duration) {
|
||||
value = duration;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -972,7 +972,7 @@ export var TweenLite = (function(window) {
|
||||
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
||||
p._notifyPluginsOfEnabled = p._lazy = false;
|
||||
|
||||
TweenLite.version = "2.1.0";
|
||||
TweenLite.version = "2.1.3";
|
||||
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
||||
TweenLite.defaultOverwrite = "auto";
|
||||
TweenLite.ticker = _ticker;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -32,12 +32,12 @@ _gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLit
|
||||
}
|
||||
delete vars.cycle;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -74,10 +74,11 @@ _gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLit
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
TweenMax = function(target, duration, vars) {
|
||||
@@ -98,7 +99,7 @@ _gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLit
|
||||
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
|
||||
_blankArray = [];
|
||||
|
||||
TweenMax.version = "2.1.0";
|
||||
TweenMax.version = "2.1.3";
|
||||
p.constructor = TweenMax;
|
||||
p.kill()._gc = false;
|
||||
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
|
||||
@@ -594,7 +595,7 @@ _gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLit
|
||||
//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------
|
||||
|
||||
p.progress = function(value, suppressEvents) {
|
||||
return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);
|
||||
return (!arguments.length) ? (this.duration() ? this._time / this._duration : this.ratio) : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);
|
||||
};
|
||||
|
||||
p.totalProgress = function(value, suppressEvents) {
|
||||
@@ -610,7 +611,7 @@ _gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLit
|
||||
}
|
||||
var duration = this._duration,
|
||||
cycle = this._cycle,
|
||||
cycleDur = cycle * (duration * this._repeatDelay);
|
||||
cycleDur = cycle * (duration + this._repeatDelay);
|
||||
if (value > duration) {
|
||||
value = duration;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "gsap",
|
||||
"version": "2.1.0",
|
||||
"description": "GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See http://greensock.com/why-gsap/ for details about what makes GSAP so special.",
|
||||
"version": "2.1.3",
|
||||
"description": "GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 8 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See http://greensock.com/why-gsap/ for details about what makes GSAP so special.",
|
||||
"homepage": "https://greensock.com/gsap/",
|
||||
"filename": "index.js",
|
||||
"module": "index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.6.6
|
||||
* DATE: 2018-02-15
|
||||
* VERSION: 0.6.8
|
||||
* DATE: 2018-02-22
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -9,4 +9,4 @@
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
*/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSRulePlugin",["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"],function(a,b,c){var d=function(){a.call(this,"cssRule"),this._overwriteProps.length=0},e=_gsScope.document,f=c.prototype.setRatio,g=d.prototype=new c;return g._propName="cssRule",g.constructor=d,d.version="0.6.6",d.API=2,d.getRule=function(a){var b,c,d,f,g=e.all?"rules":"cssRules",h=e.styleSheets,i=h.length,j=":"===a.charAt(0);for(a=(j?"":",")+a.split("::").join(":").toLowerCase()+",",j&&(f=[]);--i>-1;){try{if(c=h[i][g],!c)continue;b=c.length}catch(k){console.log(k);continue}for(;--b>-1;)if(d=c[b],d.selectorText&&-1!==(","+d.selectorText.split("::").join(":").toLowerCase()+",").indexOf(a)){if(!j)return d.style;f.push(d.style)}}return f},g._onInitTween=function(a,b,d){if(void 0===a.cssText)return!1;var f=a._gsProxy=a._gsProxy||e.createElement("div");return this._ss=a,this._proxy=f.style,f.style.cssText=a.cssText,c.prototype._onInitTween.call(this,f,b,d),!0},g.setRatio=function(a){f.call(this,a),this._ss.cssText=this._proxy.cssText},a.activate([d]),d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("CSSRulePlugin");
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSRulePlugin",["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"],function(a,b,c){var d=function(){a.call(this,"cssRule"),this._overwriteProps.length=0},e=_gsScope.document,f=c.prototype.setRatio,g=d.prototype=new c;return g._propName="cssRule",g.constructor=d,d.version="0.6.8",d.API=2,d.getRule=function(a){var b,c,d,f,g=e.all?"rules":"cssRules",h=e.styleSheets,i=h.length,j=":"===a.charAt(0);for(a=(j?"":",")+a.split("::").join(":").toLowerCase()+",",j&&(f=[]);--i>-1;){try{if(c=h[i][g],!c)continue;b=c.length}catch(k){console.log(k);continue}for(;--b>-1;)if(d=c[b],d.selectorText&&-1!==(","+d.selectorText.split("::").join(":").toLowerCase()+",").indexOf(a)){if(!j)return d.style;f.push(d.style)}}return f},g._onInitTween=function(a,b,d){if(void 0===a.cssText)return!1;var f=a._gsProxy=a._gsProxy||e.createElement("div");return this._ss=a,this._proxy=f.style,f.style.cssText=a.cssText,c.prototype._onInitTween.call(this,f,b,d),!0},g.setRatio=function(a){f.call(this,a);for(var b=this._proxy,c=this._ss,d=b.length;--d>-1;)c[b[d]]=b[b[d]]},a.activate([d]),d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("CSSRulePlugin");
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -72,16 +72,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
_defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true
|
||||
var ir = "immediateRender";
|
||||
if (!(ir in toVars)) {
|
||||
toVars[ir] = !(tl._paused || (fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
}
|
||||
return toVars;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -118,15 +118,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
p = TimelineLite.prototype = new SimpleTimeline();
|
||||
|
||||
TimelineLite.version = "2.1.0";
|
||||
TimelineLite.version = "2.1.3";
|
||||
TimelineLite.distribute = _distribute;
|
||||
p.constructor = TimelineLite;
|
||||
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
||||
@@ -443,6 +444,29 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
||||
time += self._time - prevTime;
|
||||
}
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time > prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - time : time) / self._timeScale;
|
||||
}
|
||||
}
|
||||
if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts.
|
||||
self._totalTime = self._time = totalDur;
|
||||
if (!self._reversed) if (!self._hasPausedChild()) {
|
||||
@@ -495,31 +519,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time >= prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (time / self._timeScale);
|
||||
}
|
||||
}
|
||||
|
||||
self._totalTime = self._time = self._rawPrevTime = time;
|
||||
}
|
||||
if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-11
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -35,7 +35,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
|
||||
p.constructor = TimelineMax;
|
||||
p.kill()._gc = false;
|
||||
TimelineMax.version = "2.1.0";
|
||||
TimelineMax.version = "2.1.3";
|
||||
|
||||
p.invalidate = function() {
|
||||
this._yoyo = !!this.vars.yoyo;
|
||||
@@ -211,35 +211,34 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
time = self._time;
|
||||
if (time >= prevTime || (self._repeat && prevCycle !== self._cycle)) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
time = self._time;
|
||||
if (time > prevTime || (self._repeat && prevCycle !== self._cycle)) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
if (pauseTween) {
|
||||
pauseTime = self._startTime + (pauseTween._startTime / self._timeScale);
|
||||
if (pauseTween._startTime < dur) {
|
||||
self._time = self._rawPrevTime = time = pauseTween._startTime;
|
||||
self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay));
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - pauseTween._startTime : pauseTween._startTime) / self._timeScale;
|
||||
if (pauseTween._startTime < dur) {
|
||||
self._time = self._rawPrevTime = time = pauseTween._startTime;
|
||||
self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (self._cycle !== prevCycle) if (!self._locked) {
|
||||
@@ -478,7 +477,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
var duration = this._duration,
|
||||
cycle = this._cycle,
|
||||
cycleDur = cycle * (duration * this._repeatDelay);
|
||||
cycleDur = cycle * (duration + this._repeatDelay);
|
||||
if (value > duration) {
|
||||
value = duration;
|
||||
}
|
||||
@@ -589,16 +588,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
_defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true
|
||||
var ir = "immediateRender";
|
||||
if (!(ir in toVars)) {
|
||||
toVars[ir] = !(tl._paused || (fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
}
|
||||
return toVars;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -635,15 +634,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
p = TimelineLite.prototype = new SimpleTimeline();
|
||||
|
||||
TimelineLite.version = "2.1.0";
|
||||
TimelineLite.version = "2.1.3";
|
||||
TimelineLite.distribute = _distribute;
|
||||
p.constructor = TimelineLite;
|
||||
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
||||
@@ -960,6 +960,29 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
||||
time += self._time - prevTime;
|
||||
}
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time > prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - time : time) / self._timeScale;
|
||||
}
|
||||
}
|
||||
if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts.
|
||||
self._totalTime = self._time = totalDur;
|
||||
if (!self._reversed) if (!self._hasPausedChild()) {
|
||||
@@ -1012,31 +1035,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time >= prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (time / self._timeScale);
|
||||
}
|
||||
}
|
||||
|
||||
self._totalTime = self._time = self._rawPrevTime = time;
|
||||
}
|
||||
if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -963,7 +963,7 @@
|
||||
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
||||
p._notifyPluginsOfEnabled = p._lazy = false;
|
||||
|
||||
TweenLite.version = "2.1.0";
|
||||
TweenLite.version = "2.1.3";
|
||||
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
||||
TweenLite.defaultOverwrite = "auto";
|
||||
TweenLite.ticker = _ticker;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
|
||||
@@ -35,12 +35,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
delete vars.cycle;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -77,10 +77,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
TweenMax = function(target, duration, vars) {
|
||||
@@ -101,7 +102,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
|
||||
_blankArray = [];
|
||||
|
||||
TweenMax.version = "2.1.0";
|
||||
TweenMax.version = "2.1.3";
|
||||
p.constructor = TweenMax;
|
||||
p.kill()._gc = false;
|
||||
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
|
||||
@@ -597,7 +598,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------
|
||||
|
||||
p.progress = function(value, suppressEvents) {
|
||||
return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);
|
||||
return (!arguments.length) ? (this.duration() ? this._time / this._duration : this.ratio) : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);
|
||||
};
|
||||
|
||||
p.totalProgress = function(value, suppressEvents) {
|
||||
@@ -613,7 +614,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
var duration = this._duration,
|
||||
cycle = this._cycle,
|
||||
cycleDur = cycle * (duration * this._repeatDelay);
|
||||
cycleDur = cycle * (duration + this._repeatDelay);
|
||||
if (value > duration) {
|
||||
value = duration;
|
||||
}
|
||||
@@ -737,16 +738,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
_defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true
|
||||
var ir = "immediateRender";
|
||||
if (!(ir in toVars)) {
|
||||
toVars[ir] = !(tl._paused || (fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
}
|
||||
return toVars;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -783,15 +784,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
p = TimelineLite.prototype = new SimpleTimeline();
|
||||
|
||||
TimelineLite.version = "2.1.0";
|
||||
TimelineLite.version = "2.1.3";
|
||||
TimelineLite.distribute = _distribute;
|
||||
p.constructor = TimelineLite;
|
||||
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
||||
@@ -1108,6 +1110,29 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
||||
time += self._time - prevTime;
|
||||
}
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time > prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - time : time) / self._timeScale;
|
||||
}
|
||||
}
|
||||
if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts.
|
||||
self._totalTime = self._time = totalDur;
|
||||
if (!self._reversed) if (!self._hasPausedChild()) {
|
||||
@@ -1160,31 +1185,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time >= prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (time / self._timeScale);
|
||||
}
|
||||
}
|
||||
|
||||
self._totalTime = self._time = self._rawPrevTime = time;
|
||||
}
|
||||
if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) {
|
||||
@@ -1544,7 +1544,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
|
||||
p.constructor = TimelineMax;
|
||||
p.kill()._gc = false;
|
||||
TimelineMax.version = "2.1.0";
|
||||
TimelineMax.version = "2.1.3";
|
||||
|
||||
p.invalidate = function() {
|
||||
this._yoyo = !!this.vars.yoyo;
|
||||
@@ -1720,35 +1720,34 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
time = self._time;
|
||||
if (time >= prevTime || (self._repeat && prevCycle !== self._cycle)) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
time = self._time;
|
||||
if (time > prevTime || (self._repeat && prevCycle !== self._cycle)) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
if (pauseTween) {
|
||||
pauseTime = self._startTime + (pauseTween._startTime / self._timeScale);
|
||||
if (pauseTween._startTime < dur) {
|
||||
self._time = self._rawPrevTime = time = pauseTween._startTime;
|
||||
self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay));
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - pauseTween._startTime : pauseTween._startTime) / self._timeScale;
|
||||
if (pauseTween._startTime < dur) {
|
||||
self._time = self._rawPrevTime = time = pauseTween._startTime;
|
||||
self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (self._cycle !== prevCycle) if (!self._locked) {
|
||||
@@ -1987,7 +1986,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
var duration = this._duration,
|
||||
cycle = this._cycle,
|
||||
cycleDur = cycle * (duration * this._repeatDelay);
|
||||
cycleDur = cycle * (duration + this._repeatDelay);
|
||||
if (value > duration) {
|
||||
value = duration;
|
||||
}
|
||||
@@ -2347,7 +2346,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
BezierPlugin = _gsScope._gsDefine.plugin({
|
||||
propName: "bezier",
|
||||
priority: -1,
|
||||
version: "1.3.8",
|
||||
version: "1.3.9",
|
||||
API: 2,
|
||||
global:true,
|
||||
|
||||
@@ -2424,26 +2423,26 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
func = this._func,
|
||||
target = this._target,
|
||||
notStart = (v !== this._startRatio),
|
||||
curIndex, inv, i, p, b, t, val, l, lengths, curSeg;
|
||||
curIndex, inv, i, p, b, t, val, l, lengths, curSeg, v1;
|
||||
if (!this._timeRes) {
|
||||
curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;
|
||||
t = (v - (curIndex * (1 / segments))) * segments;
|
||||
} else {
|
||||
lengths = this._lengths;
|
||||
curSeg = this._curSeg;
|
||||
v *= this._length;
|
||||
v1 = v * this._length;
|
||||
i = this._li;
|
||||
//find the appropriate segment (if the currently cached one isn't correct)
|
||||
if (v > this._l2 && i < segments - 1) {
|
||||
if (v1 > this._l2 && i < segments - 1) {
|
||||
l = segments - 1;
|
||||
while (i < l && (this._l2 = lengths[++i]) <= v) { }
|
||||
while (i < l && (this._l2 = lengths[++i]) <= v1) { }
|
||||
this._l1 = lengths[i-1];
|
||||
this._li = i;
|
||||
this._curSeg = curSeg = this._segments[i];
|
||||
this._s2 = curSeg[(this._s1 = this._si = 0)];
|
||||
} else if (v < this._l1 && i > 0) {
|
||||
while (i > 0 && (this._l1 = lengths[--i]) >= v) { }
|
||||
if (i === 0 && v < this._l1) {
|
||||
} else if (v1 < this._l1 && i > 0) {
|
||||
while (i > 0 && (this._l1 = lengths[--i]) >= v1) { }
|
||||
if (i === 0 && v1 < this._l1) {
|
||||
this._l1 = 0;
|
||||
} else {
|
||||
i++;
|
||||
@@ -2456,16 +2455,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
curIndex = i;
|
||||
//now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)
|
||||
v -= this._l1;
|
||||
v1 -= this._l1;
|
||||
i = this._si;
|
||||
if (v > this._s2 && i < curSeg.length - 1) {
|
||||
if (v1 > this._s2 && i < curSeg.length - 1) {
|
||||
l = curSeg.length - 1;
|
||||
while (i < l && (this._s2 = curSeg[++i]) <= v) { }
|
||||
while (i < l && (this._s2 = curSeg[++i]) <= v1) { }
|
||||
this._s1 = curSeg[i-1];
|
||||
this._si = i;
|
||||
} else if (v < this._s1 && i > 0) {
|
||||
while (i > 0 && (this._s1 = curSeg[--i]) >= v) { }
|
||||
if (i === 0 && v < this._s1) {
|
||||
} else if (v1 < this._s1 && i > 0) {
|
||||
while (i > 0 && (this._s1 = curSeg[--i]) >= v1) { }
|
||||
if (i === 0 && v1 < this._s1) {
|
||||
this._s1 = 0;
|
||||
} else {
|
||||
i++;
|
||||
@@ -2473,7 +2472,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
this._s2 = curSeg[i];
|
||||
this._si = i;
|
||||
}
|
||||
t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
||||
t = (v === 1) ? 1 : ((i + (v1 - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
||||
}
|
||||
inv = 1 - t;
|
||||
|
||||
@@ -2673,7 +2672,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
p = CSSPlugin.prototype = new TweenPlugin("css");
|
||||
|
||||
p.constructor = CSSPlugin;
|
||||
CSSPlugin.version = "2.1.0";
|
||||
CSSPlugin.version = "2.1.3";
|
||||
CSSPlugin.API = 2;
|
||||
CSSPlugin.defaultTransformPerspective = 0;
|
||||
CSSPlugin.defaultSkewType = "compensated";
|
||||
@@ -2685,6 +2684,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g,
|
||||
_relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
|
||||
_valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
||||
_valuesExpWithCommas = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b),?/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
||||
_NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=
|
||||
_suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,
|
||||
_opacityExp = /opacity *= *([^)]*)/i,
|
||||
@@ -2706,7 +2706,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
_dummyElement = {style:{}},
|
||||
_doc = _gsScope.document || {createElement: function() {return _dummyElement;}},
|
||||
_createElement = function(type, ns) {
|
||||
return (ns && _doc.createElementNS) ? _doc.createElementNS(ns, type) : _doc.createElement(type);
|
||||
var e = _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
|
||||
return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).
|
||||
},
|
||||
_tempDiv = _createElement("div"),
|
||||
_tempImg = _createElement("img"),
|
||||
@@ -3286,14 +3287,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
return a.join(",");
|
||||
}
|
||||
vals = v.match(_valuesExp) || [];
|
||||
vals = v.match(delim === "," ? _valuesExp : _valuesExpWithCommas) || [];
|
||||
i = vals.length;
|
||||
if (numVals > i--) {
|
||||
while (++i < numVals) {
|
||||
vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
|
||||
}
|
||||
}
|
||||
return pfx + vals.join(delim) + sfx;
|
||||
return ((pfx && v !== "none") ? v.substr(0, v.indexOf(vals[0])) || pfx : pfx) + vals.join(delim) + sfx; //note: prefix might be different, like for clipPath it could start with inset( or polygon(
|
||||
};
|
||||
return formatter;
|
||||
},
|
||||
@@ -3876,7 +3877,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
//IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element
|
||||
var force = _ieVers || (/Android/i.test(_agent) && !_gsScope.chrome),
|
||||
svg, rect, width;
|
||||
if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway
|
||||
if (_doc.createElementNS && _docElement.appendChild && !force) { //IE8 and earlier doesn't support SVG anyway
|
||||
svg = _createSVG("svg", _docElement);
|
||||
rect = _createSVG("rect", svg, {width:100, height:50, x:100});
|
||||
width = rect.getBoundingClientRect().width;
|
||||
@@ -3994,7 +3995,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
|
||||
}
|
||||
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
||||
if (_transformProp && isDefault && !e.offsetParent) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
||||
if (_transformProp && isDefault && !e.offsetParent && e !== _docElement) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
||||
//browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
|
||||
n = style.display;
|
||||
style.display = "block";
|
||||
@@ -4756,7 +4757,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}, allowFunc:true, prefix:true});
|
||||
|
||||
_registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});
|
||||
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0px)", prefix:true, multi:true, formatter:_getFormatter("inset(0px 0px 0px 0px)", false, true)});
|
||||
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0%)", prefix:true, multi:true, formatter:_getFormatter("inset(0% 0% 0% 0%)", false, true)});
|
||||
|
||||
_registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
|
||||
e = this.format(e);
|
||||
@@ -5010,7 +5011,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
|
||||
t.setAttribute("class", b);
|
||||
pt.data = difData.firstMPT;
|
||||
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
||||
if (t.style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
|
||||
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
||||
}
|
||||
pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
|
||||
return pt;
|
||||
}});
|
||||
@@ -7120,7 +7123,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
||||
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
||||
p._notifyPluginsOfEnabled = p._lazy = false;
|
||||
|
||||
TweenLite.version = "2.1.0";
|
||||
TweenLite.version = "2.1.3";
|
||||
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
||||
TweenLite.defaultOverwrite = "auto";
|
||||
TweenLite.ticker = _ticker;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 1.3.8
|
||||
* DATE: 2018-02-15
|
||||
* VERSION: 1.3.9
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -315,7 +315,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
BezierPlugin = _gsScope._gsDefine.plugin({
|
||||
propName: "bezier",
|
||||
priority: -1,
|
||||
version: "1.3.8",
|
||||
version: "1.3.9",
|
||||
API: 2,
|
||||
global:true,
|
||||
|
||||
@@ -392,26 +392,26 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
func = this._func,
|
||||
target = this._target,
|
||||
notStart = (v !== this._startRatio),
|
||||
curIndex, inv, i, p, b, t, val, l, lengths, curSeg;
|
||||
curIndex, inv, i, p, b, t, val, l, lengths, curSeg, v1;
|
||||
if (!this._timeRes) {
|
||||
curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;
|
||||
t = (v - (curIndex * (1 / segments))) * segments;
|
||||
} else {
|
||||
lengths = this._lengths;
|
||||
curSeg = this._curSeg;
|
||||
v *= this._length;
|
||||
v1 = v * this._length;
|
||||
i = this._li;
|
||||
//find the appropriate segment (if the currently cached one isn't correct)
|
||||
if (v > this._l2 && i < segments - 1) {
|
||||
if (v1 > this._l2 && i < segments - 1) {
|
||||
l = segments - 1;
|
||||
while (i < l && (this._l2 = lengths[++i]) <= v) { }
|
||||
while (i < l && (this._l2 = lengths[++i]) <= v1) { }
|
||||
this._l1 = lengths[i-1];
|
||||
this._li = i;
|
||||
this._curSeg = curSeg = this._segments[i];
|
||||
this._s2 = curSeg[(this._s1 = this._si = 0)];
|
||||
} else if (v < this._l1 && i > 0) {
|
||||
while (i > 0 && (this._l1 = lengths[--i]) >= v) { }
|
||||
if (i === 0 && v < this._l1) {
|
||||
} else if (v1 < this._l1 && i > 0) {
|
||||
while (i > 0 && (this._l1 = lengths[--i]) >= v1) { }
|
||||
if (i === 0 && v1 < this._l1) {
|
||||
this._l1 = 0;
|
||||
} else {
|
||||
i++;
|
||||
@@ -424,16 +424,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
curIndex = i;
|
||||
//now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)
|
||||
v -= this._l1;
|
||||
v1 -= this._l1;
|
||||
i = this._si;
|
||||
if (v > this._s2 && i < curSeg.length - 1) {
|
||||
if (v1 > this._s2 && i < curSeg.length - 1) {
|
||||
l = curSeg.length - 1;
|
||||
while (i < l && (this._s2 = curSeg[++i]) <= v) { }
|
||||
while (i < l && (this._s2 = curSeg[++i]) <= v1) { }
|
||||
this._s1 = curSeg[i-1];
|
||||
this._si = i;
|
||||
} else if (v < this._s1 && i > 0) {
|
||||
while (i > 0 && (this._s1 = curSeg[--i]) >= v) { }
|
||||
if (i === 0 && v < this._s1) {
|
||||
} else if (v1 < this._s1 && i > 0) {
|
||||
while (i > 0 && (this._s1 = curSeg[--i]) >= v1) { }
|
||||
if (i === 0 && v1 < this._s1) {
|
||||
this._s1 = 0;
|
||||
} else {
|
||||
i++;
|
||||
@@ -441,7 +441,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
this._s2 = curSeg[i];
|
||||
this._si = i;
|
||||
}
|
||||
t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
||||
t = (v === 1) ? 1 : ((i + (v1 - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
||||
}
|
||||
inv = 1 - t;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -32,7 +32,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
p = CSSPlugin.prototype = new TweenPlugin("css");
|
||||
|
||||
p.constructor = CSSPlugin;
|
||||
CSSPlugin.version = "2.1.0";
|
||||
CSSPlugin.version = "2.1.3";
|
||||
CSSPlugin.API = 2;
|
||||
CSSPlugin.defaultTransformPerspective = 0;
|
||||
CSSPlugin.defaultSkewType = "compensated";
|
||||
@@ -44,6 +44,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g,
|
||||
_relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
|
||||
_valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
||||
_valuesExpWithCommas = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b),?/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
||||
_NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=
|
||||
_suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,
|
||||
_opacityExp = /opacity *= *([^)]*)/i,
|
||||
@@ -65,7 +66,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
_dummyElement = {style:{}},
|
||||
_doc = _gsScope.document || {createElement: function() {return _dummyElement;}},
|
||||
_createElement = function(type, ns) {
|
||||
return (ns && _doc.createElementNS) ? _doc.createElementNS(ns, type) : _doc.createElement(type);
|
||||
var e = _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
|
||||
return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).
|
||||
},
|
||||
_tempDiv = _createElement("div"),
|
||||
_tempImg = _createElement("img"),
|
||||
@@ -645,14 +647,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}
|
||||
return a.join(",");
|
||||
}
|
||||
vals = v.match(_valuesExp) || [];
|
||||
vals = v.match(delim === "," ? _valuesExp : _valuesExpWithCommas) || [];
|
||||
i = vals.length;
|
||||
if (numVals > i--) {
|
||||
while (++i < numVals) {
|
||||
vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
|
||||
}
|
||||
}
|
||||
return pfx + vals.join(delim) + sfx;
|
||||
return ((pfx && v !== "none") ? v.substr(0, v.indexOf(vals[0])) || pfx : pfx) + vals.join(delim) + sfx; //note: prefix might be different, like for clipPath it could start with inset( or polygon(
|
||||
};
|
||||
return formatter;
|
||||
},
|
||||
@@ -1235,7 +1237,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
//IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element
|
||||
var force = _ieVers || (/Android/i.test(_agent) && !_gsScope.chrome),
|
||||
svg, rect, width;
|
||||
if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway
|
||||
if (_doc.createElementNS && _docElement.appendChild && !force) { //IE8 and earlier doesn't support SVG anyway
|
||||
svg = _createSVG("svg", _docElement);
|
||||
rect = _createSVG("rect", svg, {width:100, height:50, x:100});
|
||||
width = rect.getBoundingClientRect().width;
|
||||
@@ -1353,7 +1355,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
|
||||
}
|
||||
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
||||
if (_transformProp && isDefault && !e.offsetParent) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
||||
if (_transformProp && isDefault && !e.offsetParent && e !== _docElement) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
||||
//browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
|
||||
n = style.display;
|
||||
style.display = "block";
|
||||
@@ -2115,7 +2117,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
}, allowFunc:true, prefix:true});
|
||||
|
||||
_registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});
|
||||
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0px)", prefix:true, multi:true, formatter:_getFormatter("inset(0px 0px 0px 0px)", false, true)});
|
||||
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0%)", prefix:true, multi:true, formatter:_getFormatter("inset(0% 0% 0% 0%)", false, true)});
|
||||
|
||||
_registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
|
||||
e = this.format(e);
|
||||
@@ -2369,7 +2371,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
|
||||
t.setAttribute("class", b);
|
||||
pt.data = difData.firstMPT;
|
||||
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
||||
if (t.style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
|
||||
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
||||
}
|
||||
pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
|
||||
return pt;
|
||||
}});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.6.6
|
||||
* DATE: 2018-02-15
|
||||
* VERSION: 0.6.8
|
||||
* DATE: 2018-02-22
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -28,7 +28,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
|
||||
p._propName = "cssRule";
|
||||
p.constructor = CSSRulePlugin;
|
||||
CSSRulePlugin.version = "0.6.6";
|
||||
CSSRulePlugin.version = "0.6.8";
|
||||
CSSRulePlugin.API = 2;
|
||||
|
||||
/**
|
||||
@@ -94,7 +94,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
// @private gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.
|
||||
p.setRatio = function(v) {
|
||||
_superSetRatio.call(this, v);
|
||||
this._ss.cssText = this._proxy.cssText;
|
||||
var proxy = this._proxy,
|
||||
ss = this._ss,
|
||||
i = proxy.length;
|
||||
while (--i > -1) {
|
||||
ss[proxy[i]] = proxy[proxy[i]];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.9.0
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.9.1
|
||||
* DATE: 2019-02-21
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -906,12 +906,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
propName: "morphSVG",
|
||||
API: 2,
|
||||
global: true,
|
||||
version: "0.9.0",
|
||||
version: "0.9.1",
|
||||
overwriteProps: ["morphSVG"],
|
||||
|
||||
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
||||
init: function(target, value, tween, index) {
|
||||
var cs = window.getComputedStyle(target),
|
||||
var cs = target.nodeType ? window.getComputedStyle(target) : {},
|
||||
fill = cs.fill + "",
|
||||
fillSafe = !(fill === "none" || (fill.match(_numbersExp) || [])[3] === "0" || cs.fillRule === "evenodd"),
|
||||
origins = (value.origin || "50 50").split(","),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.2.1
|
||||
* DATE: 2018-02-15
|
||||
* VERSION: 0.3.0
|
||||
* DATE: 2019-05-13
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -389,13 +389,14 @@ var _gsScope = (typeof module !== "undefined" && module.exports && typeof global
|
||||
priority: 0,
|
||||
API: 2,
|
||||
global: true,
|
||||
version: "0.2.1",
|
||||
version: "0.3.0",
|
||||
|
||||
init: function (target, values, tween, index) {
|
||||
if (!target instanceof _gsScope.PIXI.DisplayObject) {
|
||||
return false;
|
||||
}
|
||||
var context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data, pt;
|
||||
var isV4 = _gsScope.PIXI.VERSION.charAt(0) === "4",
|
||||
context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data, pt;
|
||||
for (p in values) {
|
||||
context = _contexts[p];
|
||||
value = values[p];
|
||||
@@ -431,12 +432,12 @@ var _gsScope = (typeof module !== "undefined" && module.exports && typeof global
|
||||
colorSetter = _buildColorSetter(tween, this);
|
||||
}
|
||||
if ((p === "lineColor" || p === "fillColor") && target instanceof _gsScope.PIXI.Graphics) {
|
||||
data = target.graphicsData;
|
||||
data = (target.geometry || target).graphicsData; //"geometry" was introduced in PIXI version 5
|
||||
i = data.length;
|
||||
while (--i > -1) {
|
||||
_addColorTween(data[i], p, value, colorSetter, this);
|
||||
_addColorTween(isV4 ? data[i] : data[i][p.substr(0, 4) + "Style"], isV4 ? p : "color", value, colorSetter, this);
|
||||
}
|
||||
colorSetter.graphics = target;
|
||||
colorSetter.graphics = target.geometry || target;
|
||||
} else {
|
||||
_addColorTween(target, p, value, colorSetter, this);
|
||||
}
|
||||
@@ -460,6 +461,9 @@ var _gsScope = (typeof module !== "undefined" && module.exports && typeof global
|
||||
PixiPlugin.parseColor = _parseColor;
|
||||
PixiPlugin.formatColors = _formatColors;
|
||||
PixiPlugin.colorStringFilter = _colorStringFilter;
|
||||
PixiPlugin.registerPIXI = function(PIXI) {
|
||||
_gsScope.PIXI = PIXI;
|
||||
};
|
||||
|
||||
|
||||
}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.17.0
|
||||
* DATE: 2019-02-12
|
||||
* VERSION: 0.17.1
|
||||
* DATE: 2019-02-28
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
|
||||
@@ -1696,7 +1696,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
if (e && e.target) {
|
||||
_addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"
|
||||
}
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables !== false && !force);
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables === false && !force);
|
||||
if (isClicking) {
|
||||
_addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.
|
||||
_dispatchEvent(self, "pressInit", "onPressInit");
|
||||
@@ -2399,7 +2399,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
p.constructor = Draggable;
|
||||
p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
|
||||
p.isDragging = p.isPressed = false;
|
||||
Draggable.version = "0.17.0";
|
||||
Draggable.version = "0.17.1";
|
||||
Draggable.zIndex = 1000;
|
||||
|
||||
_addListener(_doc, "touchcancel", function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 0.1.9
|
||||
* DATE: 2019-02-07
|
||||
* VERSION: 0.1.11
|
||||
* DATE: 2019-05-16
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -717,7 +717,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
record("out", outProgress);
|
||||
}
|
||||
startTime = 0;
|
||||
maxDuration = Math.min(1000, vars.maxDuration || 1000, _getClippedDuration(selectedAnimation));
|
||||
maxDuration = vars.maxDuration || Math.min(1000, _getClippedDuration(selectedAnimation));
|
||||
if (selectedAnimation === _recordedRoot || vars.globalSync !== false) {
|
||||
_merge();
|
||||
linkedAnimation = _rootTween;
|
||||
@@ -1102,7 +1102,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
|
||||
|
||||
|
||||
GSDevTools.version = "0.1.9";
|
||||
GSDevTools.version = "0.1.11";
|
||||
GSDevTools.logOverwrites = false;
|
||||
GSDevTools.globalRecordingTime = 2;
|
||||
|
||||
@@ -2986,7 +2986,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
if (e && e.target) {
|
||||
_addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"
|
||||
}
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables !== false && !force);
|
||||
isClicking = (isClickable.call(self, e.target) && vars.dragClickables === false && !force);
|
||||
if (isClicking) {
|
||||
_addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.
|
||||
_dispatchEvent(self, "pressInit", "onPressInit");
|
||||
@@ -3689,7 +3689,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
||||
p.constructor = Draggable;
|
||||
p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
|
||||
p.isDragging = p.isPressed = false;
|
||||
Draggable.version = "0.17.0";
|
||||
Draggable.version = "0.17.1";
|
||||
Draggable.zIndex = 1000;
|
||||
|
||||
_addListener(_doc, "touchcancel", function() {
|
||||
|
||||
@@ -1,3 +1,317 @@
|
||||
## Master
|
||||
|
||||
New languages:
|
||||
|
||||
New styles:
|
||||
|
||||
Improvements:
|
||||
|
||||
## Version 9.15.6
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
- Move dependencies to be devDependencies.
|
||||
- Fixed security issues in dev dependencies.
|
||||
|
||||
## Version 9.15.5
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
🔥 Hot fix: updated build tool.
|
||||
|
||||
## Version 9.15.4
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
🔥 Hot fix: reverted hljs cli build tool, as it was causing issues with install.
|
||||
|
||||
## Version 9.15.3
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
🔥 Hot fix: reverted hljs cli build tool, as it was causing issues with install.
|
||||
|
||||
## Version 9.15.2
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
🔥 Hot fix that was preventing highlight.js from installing.
|
||||
|
||||
## Version 9.15.1
|
||||
|
||||
New languages:
|
||||
none.
|
||||
|
||||
New styles:
|
||||
none.
|
||||
|
||||
Improvements:
|
||||
|
||||
- Pony: Fixed keywords without spaces at line ends, highlighting of `iso` in class definitions, and function heads without bodies in traits and interfaces. Removed FUNCTION and CLASS modes until they are found to be needed and to provide some of the fixes.
|
||||
- Support external language files in minified version of highlight.js (#1888)
|
||||
|
||||
## Version 9.15
|
||||
|
||||
New languages:
|
||||
none.
|
||||
|
||||
New styles:
|
||||
none.
|
||||
|
||||
Improvements:
|
||||
- new cli tool `hljs` - allows easier [building from command line](docs/building-testing.rst#building-a-bundle-from-the-command-line).
|
||||
- cpp: Fully support C++11 raw strings. (#1897)
|
||||
- Python: Treat False None and True as literals (#1920)
|
||||
|
||||
## Version 9.14.2
|
||||
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
- *Gauss* fixed to stop global namespace pollution [Scott Hyndman][].
|
||||
- fix(Tcl): removed apostrophe string delimiters (don't exist)
|
||||
|
||||
[Scott Hyndman]: https://github.com/shyndman
|
||||
|
||||
## Version 9.14.1
|
||||
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
- Pony: language improvements (#1958)
|
||||
|
||||
## Version 9.14.0
|
||||
|
||||
New languages:
|
||||
none.
|
||||
New styles:
|
||||
none.
|
||||
Improvements:
|
||||
- Pony: add missing "object" highlighting (#1932)
|
||||
- Added *XQuery* built-in functions, prolog declarations, as well as parsing of function bodies, computed and direct constructors, by [Duncan Paterson][]
|
||||
- fix(dart): Corrects highlighting with string interpolation. (#1946)
|
||||
- fix(swift): be eager on optional-using types (!/?) (#1919)
|
||||
- fix(tex): Changed cyrillic to unicode (IE11 throw SCRIPT5021) (#1601)
|
||||
- fix(JavaScript): Recognize get/set accessor keywords (#1940)
|
||||
- Fixed Dockerfile definition when using highlight continuation parameter, by [Laurent Voullemier][]
|
||||
- Added tests & new `annotation` and `verbatim` keywords to *Crystal*, by [Benoit de Chezelles][]
|
||||
- Added missing dockerfile markup tests, by [Laurent Voullemier][]
|
||||
Allow empty prompt text in clojure-repl, by [Egor Rogov][]
|
||||
- Fixed several issues with *Crystal* language definition, by [Johannes Müller][]
|
||||
- Added `C#` as an alias for *CSharp* language, by [Ahmed Atito][]
|
||||
- Added generic user-defined proc support, new compiler define, refactor to re-use rules, and add tests to *GAUSS*, by [Matthew Evans][]
|
||||
- Improve *Crystal* language to highlight regexes after some keywords, by [Tsuyusato Kitsune][]
|
||||
- Fix filterByQualifiers: fileInfo can be null
|
||||
- Fixed String interpolation in Dart, by [Scott Hyndman][].
|
||||
|
||||
[Laurent Voullemier]: https://github.com/l-vo
|
||||
[Benoit de Chezelles]: https://github.com/bew
|
||||
[Johannes Müller]: https://github.com/straight-shoota
|
||||
[Ahmed Atito]: https://github.com/atitoa93
|
||||
[Matthew Evans]: https://github.com/matthewevans
|
||||
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
|
||||
[Scott Hyndman]: https://github.com/shyndman
|
||||
[Duncan Paterson]: https://github.com/duncdrum
|
||||
|
||||
## Version 9.13.1
|
||||
|
||||
Improvements:
|
||||
|
||||
- *C#* function declarations no longer include trailing whitespace, by [JeremyTCD][]
|
||||
- Added new and missing keywords to *AngelScript*, by [Melissa Geels][]
|
||||
- *TypeScript* decorator factories highlighting fix, by [Antoine Boisier-Michaud][]
|
||||
- Added support for multiline strings to *Swift*, by [Alejandro Isaza][]
|
||||
- Fixed issue that was causing some minifiers to fail.
|
||||
- Fixed `autoDetection` to accept language aliases.
|
||||
|
||||
[JeremyTCD]: https://github.com/JeremyTCD
|
||||
[Melissa Geels]: https://github.com/codecat
|
||||
[Antoine Boisier-Michaud]: https://github.com/Aboisier
|
||||
[Alejandro Isaza]: https://github.com/alejandro-isaza
|
||||
|
||||
## Version 9.13.0
|
||||
|
||||
New languages:
|
||||
|
||||
- *ArcGIS Arcade* by [John Foster][]
|
||||
- *AngelScript* by [Melissa Geels][]
|
||||
- *GML* by [meseta][]
|
||||
- *isbl* built-in language DIRECTUM and Conterra by [Dmitriy Tarasov][].
|
||||
- *PostgreSQL* SQL dialect and PL/pgSQL language by [Egor Rogov][].
|
||||
- *ReasonML* by [Gidi Meir Morris][]
|
||||
- *SAS* by [Mauricio Caceres Bravo][]
|
||||
- *Plaintext* by [Egor Rogov][]
|
||||
- *.properties* by [bostko][] and [Egor Rogov][]
|
||||
|
||||
New styles:
|
||||
|
||||
- *a11y-dark theme* by [Eric Bailey][]
|
||||
- *a11y-light theme* by [Eric Bailey][]
|
||||
- *An Old Hope* by [Gustavo Costa][]
|
||||
- *Atom One Dark Reasonable* by [Gidi Meir Morris][]
|
||||
- *isbl editor dark* by [Dmitriy Tarasov][]
|
||||
- *isbl editor light* by [Dmitriy Tarasov][]
|
||||
- *Lightfair* by [Tristian Kelly][]
|
||||
- [*Nord*][nord-highlightjs] by [Arctic Ice Studio][]
|
||||
- *[🦄 Shades of Purple](https://github.com/ahmadawais/Shades-of-Purple-HighlightJS)* by [Ahmad Awais][]
|
||||
|
||||
Improvements:
|
||||
|
||||
- New attribute `endSameAsBegin` for nested constructs with variable names
|
||||
by [Egor Rogov][].
|
||||
- *Python* highlighting of escaped quotes fixed by [Harmon][]
|
||||
- *PHP*: Added alias for php7, by [Vijaya Chandran Mani][]
|
||||
- *C++* string handling, by [David Benjamin][]
|
||||
- *Swift* Add `@objcMembers` to `@attributes`, by [Berk Çebi][]
|
||||
- Infrastructural changes by [Marcos Cáceres][]
|
||||
- Fixed metachars highighting for *NSIS* by [Jan T. Sott][]
|
||||
- *Yaml* highlight local tags as types by [Léo Lam][]
|
||||
- Improved highlighting for *Elixir* by [Piotr Kaminski][]
|
||||
- New attribute `disableAutodetect` for preventing autodetection by [Egor Rogov][]
|
||||
- *Matlab*: transpose operators and double quote strings, by [JohnC32][] and [Egor Rogov][]
|
||||
- Various documentation typos and improvemets by [Jimmy Wärting][], [Lutz Büch][], [bcleland][]
|
||||
- *Cmake* updated with new keywords and commands by [Deniz Bahadir][]
|
||||
|
||||
[Ahmad Awais]: https://github.com/ahmadawais
|
||||
[Arctic Ice Studio]: https://github.com/arcticicestudio
|
||||
[Dmitriy Tarasov]: https://github.com/MedvedTMN
|
||||
[Egor Rogov]: https://github.com/egor-rogov
|
||||
[Eric Bailey]: https://github.com/ericwbailey
|
||||
[Gidi Meir Morris]: https://github.com/gmmorris
|
||||
[Gustavo Costa]: https://github.com/gusbemacbe
|
||||
[Harmon]: https://github.com/Harmon758
|
||||
[Melissa Geels]: https://github.com/codecat
|
||||
[meseta]: https://github.com/meseta
|
||||
[nord-highlightjs]: https://github.com/arcticicestudio/nord-highlightjs
|
||||
[Tristian Kelly]: https://github.com/TristianK3604
|
||||
[Vijaya Chandran Mani]: https://github.com/vijaycs85
|
||||
[John Foster]: https://github.com/jf990
|
||||
[David Benjamin]: https://github.com/davidben
|
||||
[Berk Çebi]: https://github.com/berkcebi
|
||||
[Mauricio Caceres Bravo]: https://github.com/mcaceresb
|
||||
[bostko]: https://github.com/bostko
|
||||
[Deniz Bahadir]: https://github.com/Bagira80
|
||||
[bcleland]: https://github.com/bcleland
|
||||
[JohnC32]: https://github.com/JohnC32
|
||||
[Lutz Büch]: https://github.com/lutz-100worte
|
||||
[Piotr Kaminski]: https://github.com/pkaminski
|
||||
[Léo Lam]: https://github.com/leoetlino
|
||||
[Jan T. Sott]: https://github.com/idleberg
|
||||
[Jimmy Wärting]: https://github.com/jimmywarting
|
||||
[Marcos Cáceres]: https://github.com/marcoscaceres
|
||||
|
||||
## Version 9.12.0
|
||||
|
||||
New language:
|
||||
|
||||
- *MikroTik* RouterOS Scripting language by [Ivan Dementev][].
|
||||
|
||||
New style:
|
||||
|
||||
- *VisualStudio 2015 Dark* by [Nicolas LLOBERA][]
|
||||
|
||||
Improvements:
|
||||
- *Crystal* updated with new keywords and syntaxes by [Tsuyusato Kitsune][].
|
||||
- *Julia* updated to the modern definitions by [Alex Arslan][].
|
||||
- *julia-repl* added by [Morten Piibeleht][].
|
||||
- [Stanislav Belov][] wrote a new definition for *1C*, replacing the one that
|
||||
has not been updated for more than 8 years. The new version supports syntax
|
||||
for versions 7.7 and 8.
|
||||
- [Nicolas LLOBERA][] improved C# definition fixing edge cases with function
|
||||
titles detection and added highlighting of `[Attributes]`.
|
||||
- [nnnik][] provided a few correctness fixes for *Autohotkey*.
|
||||
- [Martin Clausen][] made annotation collections in *Clojure* to look
|
||||
consistently with other kinds.
|
||||
- [Alejandro Alonso][] updated *Swift* keywords.
|
||||
|
||||
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
|
||||
[Alex Arslan]: https://github.com/ararslan
|
||||
[Morten Piibeleht]: https://github.com/mortenpi
|
||||
[Stanislav Belov]: https://github.com/4ppl
|
||||
[Ivan Dementev]: https://github.com/DiVAN1x
|
||||
[Nicolas LLOBERA]: https://github.com/Nicolas01
|
||||
[nnnik]: https://github.com/nnnik
|
||||
[Martin Clausen]: https://github.com/maacl
|
||||
[Alejandro Alonso]: https://github.com/Azoy
|
||||
|
||||
## Version 9.11.0
|
||||
|
||||
New languages:
|
||||
|
||||
- *Shell* by [Tsuyusato Kitsune][]
|
||||
- *jboss-cli* by [Raphaël Parrëe][]
|
||||
|
||||
Improvements:
|
||||
|
||||
- [Joël Porquet] has [greatly improved the definition of *makefile*][5b3e0e6].
|
||||
- *C++* class titles are now highlighted as in other languages with classes.
|
||||
- [Jordi Petit][] added rarely used `or`, `and` and `not` keywords to *C++*.
|
||||
- [Pieter Vantorre][] fixed highlighting of negative floating point values.
|
||||
|
||||
|
||||
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
|
||||
[Jordi Petit]: https://github.com/jordi-petit
|
||||
[Raphaël Parrëe]: https://github.com/rparree
|
||||
[Pieter Vantorre]: https://github.com/NuclearCookie
|
||||
[5b3e0e6]: https://github.com/isagalaev/highlight.js/commit/5b3e0e68bfaae282faff6697d6a490567fa9d44b
|
||||
|
||||
|
||||
## Version 9.10.0
|
||||
|
||||
Apologies for missing the previous release cycle. Some thing just can't be
|
||||
automated… Anyway, we're back!
|
||||
|
||||
New languages:
|
||||
|
||||
- *Hy* by [Sergey Sobko][]
|
||||
- *Leaf* by [Hale Chan][]
|
||||
- *N1QL* by [Andres Täht][] and [Rene Saarsoo][]
|
||||
|
||||
Improvements:
|
||||
|
||||
- *Rust* got updated with new keywords by [Kasper Andersen][] and then
|
||||
significantly modernized even more by [Eduard-Mihai Burtescu][] (yes, @eddyb,
|
||||
Rust core team member!)
|
||||
- *Python* updated with f-literals by [Philipp A][].
|
||||
- *YAML* updated with unquoted strings support.
|
||||
- *Gauss* updated with new keywords by [Matt Evans][].
|
||||
- *Lua* updated with new keywords by [Joe Blow][].
|
||||
- *Kotlin* updated with new keywords by [Philipp Hauer][].
|
||||
- *TypeScript* got highlighting of function params and updated keywords by
|
||||
[Ike Ku][].
|
||||
- *Scheme* now correctly handles \`-quoted lists thanks to [Guannan Wei].
|
||||
- [Sam Wu][] fixed handling of `<<` in *C++* defines.
|
||||
|
||||
[Philipp A]: https://github.com/flying-sheep
|
||||
[Philipp Hauer]: https://github.com/phauer
|
||||
[Sergey Sobko]: https://github.com/profitware
|
||||
[Hale Chan]: https://github.com/halechan
|
||||
[Matt Evans]: https://github.com/matthewevans
|
||||
[Joe Blow]: https://github.com/mossarelli
|
||||
[Kasper Andersen]: https://github.com/kasma1990
|
||||
[Eduard-Mihai Burtescu]: https://github.com/eddyb
|
||||
[Andres Täht]: https://github.com/andrestaht
|
||||
[Rene Saarsoo]: https://github.com/nene
|
||||
[Philipp Hauer]: https://github.com/phauer
|
||||
[Ike Ku]: https://github.com/dempfi
|
||||
[Guannan Wei]: https://github.com/Kraks
|
||||
[Sam Wu]: https://github.com/samsam2310
|
||||
|
||||
|
||||
## Version 9.9.0
|
||||
|
||||
New languages
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Highlight.js
|
||||
|
||||
[](https://travis-ci.org/isagalaev/highlight.js)
|
||||
[](https://travis-ci.org/highlightjs/highlight.js) [](https://greenkeeper.io/)
|
||||
|
||||
Highlight.js is a syntax highlighter written in JavaScript. It works in
|
||||
the browser as well as on the server. It works with pretty much any
|
||||
markup, doesn’t depend on any framework and has automatic language
|
||||
markup, doesn’t depend on any framework, and has automatic language
|
||||
detection.
|
||||
|
||||
## Getting Started
|
||||
@@ -31,6 +31,13 @@ The list of supported language classes is available in the [class
|
||||
reference][2]. Classes can also be prefixed with either `language-` or
|
||||
`lang-`.
|
||||
|
||||
To make arbitrary text look like code, but without highlighting, use the
|
||||
`plaintext` class:
|
||||
|
||||
```html
|
||||
<pre><code class="plaintext">...</code></pre>
|
||||
```
|
||||
|
||||
To disable highlighting altogether use the `nohighlight` class:
|
||||
|
||||
```html
|
||||
@@ -44,24 +51,24 @@ highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
|
||||
functions. This allows you to control *what* to highlight and *when*.
|
||||
|
||||
Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using
|
||||
jQuery:
|
||||
vanilla JS:
|
||||
|
||||
```javascript
|
||||
$(document).ready(function() {
|
||||
$('pre code').each(function(i, block) {
|
||||
```js
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
document.querySelectorAll('pre code').forEach((block) => {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
You can use any tags instead of `<pre><code>` to mark up your code. If
|
||||
you don't use a container that preserve line breaks you will need to
|
||||
you don't use a container that preserves line breaks you will need to
|
||||
configure highlight.js to use the `<br>` tag:
|
||||
|
||||
```javascript
|
||||
```js
|
||||
hljs.configure({useBR: true});
|
||||
|
||||
$('div.code').each(function(i, block) {
|
||||
document.querySelectorAll('div.code').forEach((block) => {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
```
|
||||
@@ -76,23 +83,23 @@ window while dealing with very big chunks of code.
|
||||
|
||||
In your main script:
|
||||
|
||||
```javascript
|
||||
addEventListener('load', function() {
|
||||
var code = document.querySelector('#code');
|
||||
var worker = new Worker('worker.js');
|
||||
worker.onmessage = function(event) { code.innerHTML = event.data; }
|
||||
```js
|
||||
addEventListener('load', () => {
|
||||
const code = document.querySelector('#code');
|
||||
const worker = new Worker('worker.js');
|
||||
worker.onmessage = (event) => { code.innerHTML = event.data; }
|
||||
worker.postMessage(code.textContent);
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
In worker.js:
|
||||
|
||||
```javascript
|
||||
onmessage = function(event) {
|
||||
```js
|
||||
onmessage = (event) => {
|
||||
importScripts('<path>/highlight.pack.js');
|
||||
var result = self.hljs.highlightAuto(event.data);
|
||||
const result = self.hljs.highlightAuto(event.data);
|
||||
postMessage(result.value);
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -115,17 +122,48 @@ too big. If you don't see the language you need in the ["Common" section][5],
|
||||
it can be added manually:
|
||||
|
||||
```html
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
|
||||
<script
|
||||
charset="UTF-8"
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/go.min.js"></script>
|
||||
```
|
||||
|
||||
**On Almond.** You need to use the optimizer to give the module a name. For
|
||||
example:
|
||||
|
||||
```
|
||||
```bash
|
||||
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
|
||||
```
|
||||
|
||||
|
||||
### CommonJS
|
||||
|
||||
You can import Highlight.js as a CommonJS-module:
|
||||
|
||||
```bash
|
||||
npm install highlight.js --save
|
||||
```
|
||||
|
||||
In your application:
|
||||
|
||||
```js
|
||||
import hljs from 'highlight.js';
|
||||
```
|
||||
|
||||
The default import imports all languages! Therefore it is likely to be more efficient to import only the library and the languages you need:
|
||||
|
||||
```js
|
||||
import hljs from 'highlight.js/lib/highlight';
|
||||
import javascript from 'highlight.js/lib/languages/javascript';
|
||||
hljs.registerLanguage('javascript', javascript);
|
||||
```
|
||||
|
||||
To set the syntax highlighting style, if your build tool processes CSS from your JavaScript entry point, you can import the stylesheet directly into your CommonJS-module:
|
||||
|
||||
```js
|
||||
import hljs from 'highlight.js/lib/highlight';
|
||||
import 'highlight.js/styles/github.css';
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Highlight.js is released under the BSD License. See [LICENSE][7] file
|
||||
@@ -146,5 +184,5 @@ Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
|
||||
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
|
||||
[5]: https://highlightjs.org/download/
|
||||
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
|
||||
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
|
||||
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
|
||||
[7]: https://github.com/highlightjs/highlight.js/blob/master/LICENSE
|
||||
[8]: https://github.com/highlightjs/highlight.js/blob/master/AUTHORS.en.txt
|
||||
|
||||
@@ -40,11 +40,11 @@ Highlight.js — это инструмент для подсветки синт
|
||||
можно управлять тем, *что* и *когда* подсвечивать.
|
||||
|
||||
Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но
|
||||
с использованием jQuery:
|
||||
с использованием `document.addEventListener`:
|
||||
|
||||
```javascript
|
||||
$(document).ready(function() {
|
||||
$('pre code').each(function(i, block) {
|
||||
```js
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
document.querySelectorAll('pre code').forEach((block) => {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
});
|
||||
@@ -54,10 +54,10 @@ $(document).ready(function() {
|
||||
используете контейнер, не сохраняющий переводы строк, вам нужно сказать
|
||||
highlight.js использовать для них тег `<br>`:
|
||||
|
||||
```javascript
|
||||
```js
|
||||
hljs.configure({useBR: true});
|
||||
|
||||
$('div.code').each(function(i, block) {
|
||||
document.querySelectorAll('div.code').forEach((block) => {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
```
|
||||
@@ -72,23 +72,23 @@ $('div.code').each(function(i, block) {
|
||||
|
||||
В основном скрипте:
|
||||
|
||||
```javascript
|
||||
addEventListener('load', function() {
|
||||
var code = document.querySelector('#code');
|
||||
var worker = new Worker('worker.js');
|
||||
worker.onmessage = function(event) { code.innerHTML = event.data; }
|
||||
```js
|
||||
addEventListener('load', () => {
|
||||
const code = document.querySelector('#code');
|
||||
const worker = new Worker('worker.js');
|
||||
worker.onmessage = (event) => { code.innerHTML = event.data; }
|
||||
worker.postMessage(code.textContent);
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
В worker.js:
|
||||
|
||||
```javascript
|
||||
onmessage = function(event) {
|
||||
```js
|
||||
onmessage = (event) => {
|
||||
importScripts('<path>/highlight.pack.js');
|
||||
var result = self.hljs.highlightAuto(event.data);
|
||||
const result = self.hljs.highlightAuto(event.data);
|
||||
postMessage(result.value);
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -138,5 +138,5 @@ Highlight.js распространяется под лицензией BSD. П
|
||||
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
|
||||
[5]: https://highlightjs.org/download/
|
||||
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
|
||||
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
|
||||
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt
|
||||
[7]: https://github.com/highlightjs/highlight.js/blob/master/LICENSE
|
||||
[8]: https://github.com/highlightjs/highlight.js/blob/master/AUTHORS.ru.txt
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/* a11y-dark theme */
|
||||
/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */
|
||||
/* @author: ericwbailey */
|
||||
|
||||
/* Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #d4d0ab;
|
||||
}
|
||||
|
||||
/* Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-regexp,
|
||||
.hljs-deletion {
|
||||
color: #ffa07a;
|
||||
}
|
||||
|
||||
/* Orange */
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params,
|
||||
.hljs-meta,
|
||||
.hljs-link {
|
||||
color: #f5ab35;
|
||||
}
|
||||
|
||||
/* Yellow */
|
||||
.hljs-attribute {
|
||||
color: #ffd700;
|
||||
}
|
||||
|
||||
/* Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition {
|
||||
color: #abe338;
|
||||
}
|
||||
|
||||
/* Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #00e0e0;
|
||||
}
|
||||
|
||||
/* Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #dcc6e0;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #2b2b2b;
|
||||
color: #f8f8f2;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media screen and (-ms-high-contrast: active) {
|
||||
.hljs-addition,
|
||||
.hljs-attribute,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-bullet,
|
||||
.hljs-comment,
|
||||
.hljs-link,
|
||||
.hljs-literal,
|
||||
.hljs-meta,
|
||||
.hljs-number,
|
||||
.hljs-params,
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-type,
|
||||
.hljs-quote {
|
||||
color: highlight;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/* a11y-light theme */
|
||||
/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */
|
||||
/* @author: ericwbailey */
|
||||
|
||||
/* Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #696969;
|
||||
}
|
||||
|
||||
/* Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-regexp,
|
||||
.hljs-deletion {
|
||||
color: #d91e18;
|
||||
}
|
||||
|
||||
/* Orange */
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params,
|
||||
.hljs-meta,
|
||||
.hljs-link {
|
||||
color: #aa5d00;
|
||||
}
|
||||
|
||||
/* Yellow */
|
||||
.hljs-attribute {
|
||||
color: #aa5d00;
|
||||
}
|
||||
|
||||
/* Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition {
|
||||
color: #008000;
|
||||
}
|
||||
|
||||
/* Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #007faa;
|
||||
}
|
||||
|
||||
/* Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #7928a1;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #fefefe;
|
||||
color: #545454;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media screen and (-ms-high-contrast: active) {
|
||||
.hljs-addition,
|
||||
.hljs-attribute,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-bullet,
|
||||
.hljs-comment,
|
||||
.hljs-link,
|
||||
.hljs-literal,
|
||||
.hljs-meta,
|
||||
.hljs-number,
|
||||
.hljs-params,
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-type,
|
||||
.hljs-quote {
|
||||
color: highlight;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
|
||||
An Old Hope – Star Wars Syntax (c) Gustavo Costa <gusbemacbe@gmail.com>
|
||||
Original theme - Ocean Dark Theme – by https://github.com/gavsiu
|
||||
Based on Jesse Leite's Atom syntax theme 'An Old Hope' – https://github.com/JesseLeite/an-old-hope-syntax-atom
|
||||
|
||||
*/
|
||||
|
||||
/* Death Star Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote
|
||||
{
|
||||
color: #B6B18B;
|
||||
}
|
||||
|
||||
/* Darth Vader */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-regexp,
|
||||
.hljs-deletion
|
||||
{
|
||||
color: #EB3C54;
|
||||
}
|
||||
|
||||
/* Threepio */
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params,
|
||||
.hljs-meta,
|
||||
.hljs-link
|
||||
{
|
||||
color: #E7CE56;
|
||||
}
|
||||
|
||||
/* Luke Skywalker */
|
||||
.hljs-attribute
|
||||
{
|
||||
color: #EE7C2B;
|
||||
}
|
||||
|
||||
/* Obi Wan Kenobi */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition
|
||||
{
|
||||
color: #4FB4D7;
|
||||
}
|
||||
|
||||
/* Yoda */
|
||||
.hljs-title,
|
||||
.hljs-section
|
||||
{
|
||||
color: #78BB65;
|
||||
}
|
||||
|
||||
/* Mace Windu */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag
|
||||
{
|
||||
color: #B45EA4;
|
||||
}
|
||||
|
||||
/* Millenium Falcon */
|
||||
.hljs
|
||||
{
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #1C1D21;
|
||||
color: #c0c5ce;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
|
||||
Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage
|
||||
|
||||
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
|
||||
|
||||
*/
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
line-height: 1.3em;
|
||||
color: #abb2bf;
|
||||
background: #282c34;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.hljs-keyword, .hljs-operator {
|
||||
color: #F92672;
|
||||
}
|
||||
.hljs-pattern-match {
|
||||
color: #F92672;
|
||||
}
|
||||
.hljs-pattern-match .hljs-constructor {
|
||||
color: #61aeee;
|
||||
}
|
||||
.hljs-function {
|
||||
color: #61aeee;
|
||||
}
|
||||
.hljs-function .hljs-params {
|
||||
color: #A6E22E;
|
||||
}
|
||||
.hljs-function .hljs-params .hljs-typing {
|
||||
color: #FD971F;
|
||||
}
|
||||
.hljs-module-access .hljs-module {
|
||||
color: #7e57c2;
|
||||
}
|
||||
.hljs-constructor {
|
||||
color: #e2b93d;
|
||||
}
|
||||
.hljs-constructor .hljs-string {
|
||||
color: #9CCC65;
|
||||
}
|
||||
.hljs-comment, .hljs-quote {
|
||||
color: #b18eb1;
|
||||
font-style: italic;
|
||||
}
|
||||
.hljs-doctag, .hljs-formula {
|
||||
color: #c678dd;
|
||||
}
|
||||
.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst {
|
||||
color: #e06c75;
|
||||
}
|
||||
.hljs-literal {
|
||||
color: #56b6c2;
|
||||
}
|
||||
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string {
|
||||
color: #98c379;
|
||||
}
|
||||
.hljs-built_in, .hljs-class .hljs-title {
|
||||
color: #e6c07b;
|
||||
}
|
||||
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number {
|
||||
color: #d19a66;
|
||||
}
|
||||
.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title {
|
||||
color: #61aeee;
|
||||
}
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
|
||||
GML Theme - Meseta <meseta@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #222222;
|
||||
color: #C0C0C0;
|
||||
}
|
||||
|
||||
.hljs-keywords {
|
||||
color: #FFB871;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-built_in {
|
||||
color: #FFB871;
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #FF8080;
|
||||
}
|
||||
|
||||
.hljs-symbol {
|
||||
color: #58E55A;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #5B995B;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
color: #FFFF00;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #FF8080;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-selector-tag,
|
||||
.hljs-doctag,
|
||||
.hljs-name,
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition,
|
||||
.hljs-regexp,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-type,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-function,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-meta,
|
||||
.hljs-subst {
|
||||
color: #C0C0C0;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
|
||||
ISBL Editor style dark color scheme (c) Dmitriy Tarasov <dimatar@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #404040;
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* Base color: saturation 0; */
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #b5b5b5;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-attribute,
|
||||
.hljs-selector-tag,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-doctag,
|
||||
.hljs-name {
|
||||
color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* User color: hue: 0 */
|
||||
|
||||
.hljs-string {
|
||||
color: #97bf0d;
|
||||
}
|
||||
|
||||
.hljs-type,
|
||||
.hljs-number,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion {
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #df471e;
|
||||
}
|
||||
|
||||
.hljs-title>.hljs-built_in {
|
||||
color: #81bce9;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-symbol,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #e2c696;
|
||||
}
|
||||
|
||||
/* Language color: hue: 90; */
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-literal {
|
||||
color: #97bf0d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition {
|
||||
color: #397300;
|
||||
}
|
||||
|
||||
.hljs-class {
|
||||
color: #ce9d4d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Meta color: hue: 200 */
|
||||
|
||||
.hljs-meta {
|
||||
color: #1f7199;
|
||||
}
|
||||
|
||||
.hljs-meta-string {
|
||||
color: #4d99bf;
|
||||
}
|
||||
|
||||
|
||||
/* Misc effects */
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
|
||||
ISBL Editor style light color schemec (c) Dmitriy Tarasov <dimatar@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Base color: saturation 0; */
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #555555;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-attribute,
|
||||
.hljs-selector-tag,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-doctag,
|
||||
.hljs-name {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* User color: hue: 0 */
|
||||
|
||||
.hljs-string {
|
||||
color: #000080;
|
||||
}
|
||||
|
||||
.hljs-type,
|
||||
.hljs-number,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #fb2c00;
|
||||
}
|
||||
|
||||
.hljs-title>.hljs-built_in {
|
||||
color: #008080;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-symbol,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #5e1700;
|
||||
}
|
||||
|
||||
/* Language color: hue: 90; */
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-literal {
|
||||
color: #000080;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition {
|
||||
color: #397300;
|
||||
}
|
||||
|
||||
.hljs-class {
|
||||
color: #6f1C00;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Meta color: hue: 200 */
|
||||
|
||||
.hljs-meta {
|
||||
color: #1f7199;
|
||||
}
|
||||
|
||||
.hljs-meta-string {
|
||||
color: #4d99bf;
|
||||
}
|
||||
|
||||
|
||||
/* Misc effects */
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
|
||||
Lightfair style (c) Tristian Kelly <tristian.kelly560@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-name {
|
||||
color:#01a3a3;
|
||||
}
|
||||
|
||||
.hljs-tag,.hljs-meta {
|
||||
color:#778899;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #444
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #888888
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-attribute,
|
||||
.hljs-selector-tag,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-doctag,
|
||||
.hljs-name {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.hljs-type,
|
||||
.hljs-string,
|
||||
.hljs-number,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion {
|
||||
color: #4286f4
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #4286f4;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-symbol,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #BC6060
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #62bcbc
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition {
|
||||
color: #25c6c6
|
||||
}
|
||||
|
||||
.hljs-meta-string {
|
||||
color: #4d99bf
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
/*
|
||||
* Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
|
||||
* Copyright (c) 2017-present Sven Greb <development@svengreb.de>
|
||||
*
|
||||
* Project: Nord highlight.js
|
||||
* Version: 0.1.0
|
||||
* Repository: https://github.com/arcticicestudio/nord-highlightjs
|
||||
* License: MIT
|
||||
* References:
|
||||
* https://github.com/arcticicestudio/nord
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #2E3440;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #D8DEE9;
|
||||
}
|
||||
|
||||
.hljs-selector-tag {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.hljs-selector-id {
|
||||
color: #8FBCBB;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-selector-class {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-selector-attr {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-selector-pseudo {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: rgba(163, 190, 140, 0.5);
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: rgba(191, 97, 106, 0.5);
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-type {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-class {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-function {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.hljs-function > .hljs-title {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-literal,
|
||||
.hljs-symbol {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #B48EAD;
|
||||
}
|
||||
|
||||
.hljs-regexp {
|
||||
color: #EBCB8B;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
color: #A3BE8C;
|
||||
}
|
||||
|
||||
.hljs-title {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-params {
|
||||
color: #D8DEE9;
|
||||
}
|
||||
|
||||
.hljs-bullet {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-formula {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-quote {
|
||||
color: #4C566A;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #4C566A;
|
||||
}
|
||||
|
||||
.hljs-doctag {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-meta,
|
||||
.hljs-meta-keyword {
|
||||
color: #5E81AC;
|
||||
}
|
||||
|
||||
.hljs-meta-string {
|
||||
color: #A3BE8C;
|
||||
}
|
||||
|
||||
.hljs-attr {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.hljs-attribute {
|
||||
color: #D8DEE9;
|
||||
}
|
||||
|
||||
.hljs-builtin-name {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.hljs-name {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.hljs-section {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.hljs-variable {
|
||||
color: #D8DEE9;
|
||||
}
|
||||
|
||||
.hljs-template-variable {
|
||||
color: #D8DEE9;
|
||||
}
|
||||
|
||||
.hljs-template-tag {
|
||||
color: #5E81AC;
|
||||
}
|
||||
|
||||
.abnf .hljs-attribute {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.abnf .hljs-symbol {
|
||||
color: #EBCB8B;
|
||||
}
|
||||
|
||||
.apache .hljs-attribute {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.apache .hljs-section {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.arduino .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.aspectj .hljs-meta {
|
||||
color: #D08770;
|
||||
}
|
||||
|
||||
.aspectj > .hljs-title {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.bnf .hljs-attribute {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.clojure .hljs-name {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.clojure .hljs-symbol {
|
||||
color: #EBCB8B;
|
||||
}
|
||||
|
||||
.coq .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.cpp .hljs-meta-string {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.css .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.css .hljs-keyword {
|
||||
color: #D08770;
|
||||
}
|
||||
|
||||
.diff .hljs-meta {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.ebnf .hljs-attribute {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.glsl .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.groovy .hljs-meta:not(:first-child) {
|
||||
color: #D08770;
|
||||
}
|
||||
|
||||
.haxe .hljs-meta {
|
||||
color: #D08770;
|
||||
}
|
||||
|
||||
.java .hljs-meta {
|
||||
color: #D08770;
|
||||
}
|
||||
|
||||
.ldif .hljs-attribute {
|
||||
color: #8FBCBB;
|
||||
}
|
||||
|
||||
.lisp .hljs-name {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.lua .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.moonscript .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.nginx .hljs-attribute {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.nginx .hljs-section {
|
||||
color: #5E81AC;
|
||||
}
|
||||
|
||||
.pf .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.processing .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
}
|
||||
|
||||
.scss .hljs-keyword {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.stylus .hljs-keyword {
|
||||
color: #81A1C1;
|
||||
}
|
||||
|
||||
.swift .hljs-meta {
|
||||
color: #D08770;
|
||||
}
|
||||
|
||||
.vim .hljs-built_in {
|
||||
color: #88C0D0;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.yaml .hljs-meta {
|
||||
color: #D08770;
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
|
||||
highlight.js style for Microtik RouterOS script
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
/* Base color: saturation 0; */
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-doctag,
|
||||
.hljs-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-attribute {
|
||||
color: #0E9A00;
|
||||
}
|
||||
|
||||
.hljs-function {
|
||||
color: #99069A;
|
||||
}
|
||||
|
||||
.hljs-builtin-name {
|
||||
color: #99069A;
|
||||
}
|
||||
|
||||
/* User color: hue: 0 */
|
||||
|
||||
.hljs-type,
|
||||
.hljs-string,
|
||||
.hljs-number,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion {
|
||||
color: #880000;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #880000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-symbol,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #BC6060;
|
||||
}
|
||||
|
||||
|
||||
/* Language color: hue: 90; */
|
||||
|
||||
.hljs-literal {
|
||||
color: #78A960;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition {
|
||||
color: #0C9A9A;
|
||||
}
|
||||
|
||||
|
||||
/* Meta color: hue: 200 */
|
||||
|
||||
.hljs-meta {
|
||||
color: #1f7199;
|
||||
}
|
||||
|
||||
.hljs-meta-string {
|
||||
color: #4d99bf;
|
||||
}
|
||||
|
||||
|
||||
/* Misc effects */
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Shades of Purple Theme — for Highlightjs.
|
||||
*
|
||||
* @author (c) Ahmad Awais <https://twitter.com/mrahmadawais/>
|
||||
* @link GitHub Repo → https://github.com/ahmadawais/Shades-of-Purple-HighlightJS
|
||||
* @version 1.5.0
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
/* Custom font is optional */
|
||||
/* font-family: 'Operator Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', 'monospace'; */
|
||||
line-height: 1.45;
|
||||
padding: 2rem;
|
||||
background: #2d2b57;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-title {
|
||||
color: #fad000;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-name {
|
||||
color: #a1feff;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.hljs-attr {
|
||||
color: #f8d000;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-selector-tag,
|
||||
.hljs-section {
|
||||
color: #fb9e00;
|
||||
}
|
||||
|
||||
.hljs-keyword {
|
||||
color: #fb9e00;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #e3dfff;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition,
|
||||
.hljs-code,
|
||||
.hljs-regexp,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-template-tag,
|
||||
.hljs-quote,
|
||||
.hljs-deletion {
|
||||
color: #4cd213;
|
||||
}
|
||||
|
||||
.hljs-meta,
|
||||
.hljs-meta-string {
|
||||
color: #fb9e00;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #ac65ff;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-number {
|
||||
color: #fa658d;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Visual Studio 2015 dark style
|
||||
* Author: Nicolas LLOBERA <nllobera@gmail.com>
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #1E1E1E;
|
||||
color: #DCDCDC;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-name {
|
||||
color: #569CD6;
|
||||
}
|
||||
.hljs-link {
|
||||
color: #569CD6;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-type {
|
||||
color: #4EC9B0;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-class {
|
||||
color: #B8D7A3;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-meta-string {
|
||||
color: #D69D85;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-template-tag {
|
||||
color: #9A5334;
|
||||
}
|
||||
|
||||
.hljs-subst,
|
||||
.hljs-function,
|
||||
.hljs-title,
|
||||
.hljs-params,
|
||||
.hljs-formula {
|
||||
color: #DCDCDC;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #57A64A;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-doctag {
|
||||
color: #608B4E;
|
||||
}
|
||||
|
||||
.hljs-meta,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-tag {
|
||||
color: #9B9B9B;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #BD63C5;
|
||||
}
|
||||
|
||||
.hljs-attr,
|
||||
.hljs-attribute,
|
||||
.hljs-builtin-name {
|
||||
color: #9CDCFE;
|
||||
}
|
||||
|
||||
.hljs-section {
|
||||
color: gold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*.hljs-code {
|
||||
font-family:'Monospace';
|
||||
}*/
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-selector-tag,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #D7BA7D;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #144212;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #600;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -12,55 +12,66 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Gray DOCTYPE selectors like WebKit */
|
||||
.xml .hljs-meta {
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #006a00;
|
||||
color: #007400;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-attribute,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal {
|
||||
color: #aa0d91;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-name {
|
||||
color: #008;
|
||||
color: #aa0d91;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #660;
|
||||
color: #3F6E74;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
.hljs-code,
|
||||
.hljs-string,
|
||||
.hljs-meta-string {
|
||||
color: #c41a16;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #080;
|
||||
color: #0E0EFF;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-tag,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-number,
|
||||
.hljs-meta {
|
||||
.hljs-number {
|
||||
color: #1c00cf;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-meta {
|
||||
color: #643820;
|
||||
}
|
||||
|
||||
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-type,
|
||||
.hljs-attr,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-params {
|
||||
color: #5c2699;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-attr {
|
||||
color: #836C28;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
overflow-x: auto;
|
||||
color: #eaeaea;
|
||||
background: #000;
|
||||
padding: 0.5;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
(function () {
|
||||
|
||||
var module = {
|
||||
exports: null
|
||||
};
|
||||
|
||||
// The french hyphenation patterns are retrieved from
|
||||
// http://tug_org/svn/texhyphen/trunk/collaboration/repository/hyphenator/
|
||||
module.exports = {
|
||||
'id': 'fr',
|
||||
'leftmin': 2,
|
||||
'rightmin': 3,
|
||||
'patterns': {
|
||||
2 : "1ç1j1q",
|
||||
3 : "1gè’â41zu1zo1zi1zè1zé1ze1za’y4_y41wu1wo1wi1we1wa1vy1vû1vu1vô1vo1vî1vi1vê1vè1vé1ve1vâ1va’û4_û4’u4_u41ba1bâ1ty1be1bé1bè1bê1tû1tu1tô1bi1bî1to1tî1ti1tê1tè1té1te1tà1tâ1ta1bo1bô1sy1sû1su1sœ1bu1bû1by2’21ca1câ1sô1ce1cé1cè1cê1so1sî1si1sê1sè1sé1se1sâ1sa1ry1rû1ru1rô1ro1rî1ri1rê1rè1ré1re1râ1ra’a41py1pû1pu1pô1po1pî1pi1pê1pè1pé1pe1pâ1pa_ô41ci1cî’ô4’o4_o41nyn1x1nû1nu1nœ1nô1no1nî1ni1nê1nè1né1ne1nâ1co1cô1na1my1mû1mu1mœ1mô1mo1mî1mi1cœ1mê1mè1mé1me1mâ1ma1ly1lû1lu1lô1lo1lî1li1lê1lè1cu1cû1cy1lé1d’1da1dâ1le1là1de1dé1dè1dê1lâ1la1ky1kû1ku1kô1ko1kî1ki1kê1kè1ké1ke1kâ1ka2jk_a4’î4_î4’i4_i41hy1hû1hu1hô1ho1hî1hi1hê1hè1hé1he1hâ1ha1gy1gû1gu1gô1go1gî1gi1gê_â41gé1ge1gâ1ga1fy1di1dî1fû1fu1fô1fo’e41fî1fi1fê1fè1do1dô1fé1fe1fâ1fa’è41du1dû1dy_è4’é4_é4’ê4_ê4_e41zy",
|
||||
4 : "1f2lab2h2ckg2ckp2cksd1s22ckb4ck_1c2k2chw4ze_4ne_2ckt1c2lad2hm1s22cht2chsch2r2chp4pe_1t2r1p2h_ph44ph_ph2l2phnph2r2phs1d2r2pht2chn4fe_2chm1p2l1p2r4me_1w2rch2l2chg1c2r2chb4ch_1f2r4le_4re_4de_f1s21k2r4we_1r2h_kh44kh_1k2h4ke_1c2h_ch44ge_4je_4se_1v2r_sh41s2h4ve_4sh_2shm2shr2shs4ce_il2l1b2r4be_1b2l4he_4te__th41t2h4th_g1s21g2r2thl1g2l2thm2thnth2r1g2n2ths2ckf",
|
||||
5 : "2ck3h4rhe_4kes_4wes_4res_4cke_éd2hi4vre_4jes_4tre_4zes_4ges_4des_i1oxy4gle_d1d2h_cul44gne_4fre_o1d2l_sch44nes_4les_4gre_1s2ch_réu24sch_4the_1g2hy4gue_2schs4cle_1g2ho1g2hi1g2he4ses_4tes_1g2ha4ves_4she_4che_4cre_4ces_t1t2l4hes_l1s2t4bes_4ble__con4xil3lco1ap4que_vil3l4fle_co1arco1exco1enco1auco1axco1ef4pes_co1é2per3h4mes__pe4r4bre_4pre_4phe_1p2né4ple__dé2smil3llil3lhil3l4dre_cil3lgil3l4fes_",
|
||||
6 : "’in1o2rcil4l4phre_4dres_l3lioni1algi2fent_émil4l4phle_rmil4l4ples_4phes_1p2neuextra14pres_y1asthpé2nul2xent__mé2sa2pent_y1algi4chre_1m2nès4bres_1p2tèr1p2tér4chle_’en1o24fles_oxy1a2avil4l_en1o24ques_uvil4lco1a2d4bles__in1a2’in1a21s2por_cons4_bi1u2’as2ta_in1e2’in1e2_in1é2’in1é21s2lov1s2lavco1acq2cent__as2ta_co1o24ches_hémi1é_in2er’in2er2s3homo1ioni_in1i2’in1i22went_4shes__ré1a2_ré1é2_ré1e2_ré2el_in1o2ucil4lco1accu2s3tr_ré2er_ré2èr4cles_2vent__ré1i22sent_2tent_2gent__ré1o24gues__re1s24sche_4thes_’en1a2e2s3ch4gres_1s2cop2lent__en1a22nent__in1u2’in1u24gnes_4cres_wa2g3n4fres_4tres_4gles_1octet_dé1o2_dé1io4thre__bi1au2jent__dé1a22zent_4vres_2dent_4ckes_4rhes__dy2s3sub1s22kent_2rent_2bent_3d2hal",
|
||||
7 : "a2g3nos3d2houdé3rent__dé3s2t_dé3s2pé3dent_2r3heur2r3hydri1s2tat2frent_io1a2ctla2w3re’in2u3l_in2u3l2crent_’in2uit_in2uit1s2caph1s2clér_ré2ussi2s3ché_re2s3t_re2s3s4sches_é3cent__seu2le’in2ond_in2ond’in2i3t_in2i3t’in2i3q_ré2aux_in2i3q2shent__di1alduni1a2x’in2ept2flent__in2eptuni1o2v2brent_co2nurb2chent_2quent_1s2perm1s2phèr_ma2c3kuevil4l1s2phér1s2piel1s2tein1s2tigm4chles_1s2tock1s2tyle1p2sych_pro1é2_ma2r1x_stil3lpusil3libril3lcyril3l_pré1s2thril3l_mé3san_pré1u2_mé2s1i_pré1o2_pré1i2piril3lpupil3lâ2ment__pré1e2_pré1é2_pré2au_pré1a22prent_2vrent_supero2_di1e2npoly1u2è2ment_poly1s2poly1o2poly1i2poly1è2poly1é2poly1e2poly1a2supe4r1capil3l2plent_armil5lsemil4lmil4letvacil4l_di2s3h3ph2tis2dlent_a2s3tro4phres_l2ment_i1è2drei1arthr2drent_4phles_supers2ô2ment_extra2i2phent_su3r2ah_su2r3hextra2chypo1u21alcool_per1u2_per1o2_per1i2_per1é2hypo1s2_per1a2hypo1o2hypo1i2hypo1é2_pen2tahypo1e2hypo1a2y1s2tome2s3cophyperu2hype4r1hypers2hypero21m2némohyperi21m2nési4chres_a1è2drehyperé2hypere2hypera2’oua1ou_oua1ouo1s2tomo1s2timo1s2tato1s2tasomni1s2tung2s3_dé3s2c2blent__bio1a2télé1e2télé1i22clent_télé1s22guent_1é2nerg2grent_2trent__dé2s1œ2t3heuro1è2dre2gnent_2glent_4thres__bi1a2t1é2drie_bi1a2c_i2g3nin3s2at_’i2g3ni2ckent__i2g3né’ab3réa’i2g3né_ab3réa_per1e2",
|
||||
8 : "_ma2l1ap_dy2s1u2_dy2s1o2_dy2s1i2n3s2ats__dy2s1a2distil3l1é2lectrinstil3l1s2trophe2n1i2vro2b3long1s2tomos_ae3s4ch’ae3s4ch_eu2r1a2ombud2s3’eu2r1a2_mono1s2_mono1u2o1s2téro_mono1o2eu1s2tato1s2tradfritil3la2l1algi_mono1i2_mono1é2_ovi1s2c’ovi1s2c_mono1e2_mono1a2co1assocpaléo1é2boutil3l1s2piros_ré2i3fi_pa2n1ischevil4l1s2patiaca3ou3t2_di1a2cé_para1s2_pa2r3héco1assur_su2b1é2tu2ment_su2ment__su2b1in_su2b3lupapil3lire3pent_’inte4r3_su2b1urab3sent__su2b1a2di2s3cophu2ment_fu2ment__intera2au2ment_as2ment_or2ment_’intera2_intere2pé1r2é2q_péri1os_péri1s2ja3cent__anti1a2_péri1u2’anti1a2er2ment__anti1e2ac3cent_ar2ment_to2ment_’intere2ré3gent_papil3leom2ment_’anti1e2photo1s2_anti1é2_interé2’anti1é2_anti1s2’anti1s23ph2talé’interé2ri2ment__interi2’interi2mi2ment_apo2s3tri2s3chio_pluri1ai2s3chia_intero2’intero2_inte4r3po1astre_interu2’interu2_inters2ai2ment_’inters2papil3la_tri1o2n_su2r1a2_pon2tet_pos2t3h_dés2a3mes3cent__pos2t3r_post1s2_tri1a2tta2ment__tri1a2nra2ment_is3cent__su2r1e2_tri1a2cfa2ment_da2ment__su3r2et_su2r1é2_mé2s1es_mé2g1oh_su2r1of_su2r1ox_re3s4ty_re3s4tu_ma2l1oc’a2g3nat_dé2s1é2_ma2l1entachy1a2_pud1d2ltchin3t2_re3s4trtran2s3p_bi2s1a2tran2s3hhémo1p2té3quent__a2g3nat_dé2s1i2télé1o2bo2g3nosiradio1a2télé1o2ppu2g3nacru3lent__sta2g3nre3lent__ré2a3le_di1a2mi",
|
||||
9 : "_ré2a3lit_dé3s2o3lthermo1s2_dé3s2ist_dé3s2i3rmit3tent_éni3tent__do3lent__ré2a3lisopu3lent__pa3tent__re2s3cap_la3tent__co2o3lie_re2s3cou_re2s3cri_ma2g3num_re2s3pir_dé3s2i3dco2g3nititran2s1a2tran2s1o2_dé3s2exu_re3s4tab_re3s4tag_dé3s2ert_re3s4tat_re3s4tén_re3s4tér_re3s4tim_re3s4tip_re3s4toc_re3s4toptran2s1u2_no2n1obs_ma2l1a2v_ma2l1int_prou3d2hpro2s3tativa3lent__ta3lent__rétro1a2_pro1s2cé_ma2l1o2dcci3dent__pa3rent__su2r1int_su2r1inf_su2r1i2mtor3rent_cur3rent__mé2s1u2stri3dent__dé3s2orm_su3r2ell_ar3dent__su3r2eaupru3dent__pré2a3lacla2ment__su3r2a3t_pos2t1o2_pos2t1inqua2ment_ter3gent_ser3gent_rai3ment_abî2ment_éci2ment_’ar3gent__ar3gent_rin3gent_tan3gent_éli2ment_ani2ment_’apo2s3ta_apo2s3tavélo1s2kivol2t1amp_dé3s2orp_dé2s1u2n_péri2s3ssesqui1a2’ana3s4trfir2ment_écu2ment_ser3pent_pré3sent_’ar3pent__ar3pent_’in1s2tab_in1s2tab’in2o3cul_in2o3culplu2ment_bou2ment_’in2exora_in2exora_su2b3linbru2ment__su3b2é3r_milli1am’in2effab_in2effab’in2augur_di1a2cid_in2augur_pa2n1opt’in2a3nit_in2a3nit1informat_ana3s4trvanil3lis_di1a2tom_su3b2altvanil3linstéréo1s2_pa2n1a2fo1s2tratuépi2s3cop_ci2s1alp1s2tructu1é2lément1é2driquepapil3lomllu2ment_",
|
||||
10 : "1s2tandardimmi3nent__émi3nent_imma3nent_réma3nent_épi3s4cope_in2i3miti’in2i3miti_res3sent_moye2n1â2gréti3cent__dé3s2a3crmon2t3réalinno3cent__mono1ï2dé_pa2n1a2méimpu3dent__pa2n1a2ra_amino1a2c’amino1a2c_pa2n1o2phinci3dent__ser3ment_appa3rent_déca3dent__dacryo1a2_dé3s2astr_re4s5trin_dé3s2é3gr_péri2s3ta_sar3ment__dé3s2oufr_re3s4tandchro2ment__com3ment__re2s3quil_re2s3pons_gem2ment__re2s3pect_re2s3ciso_dé3s2i3gn_dé3s2i3ligram2ment__dé3s2invo_re2s3cisitran3s2act’anti2enneindo3lent__sou3vent_indi3gent_dili3gent_flam2ment_impo3tent_inso3lent_esti2ment_’on3guent__on3guent_inti2ment__dé3s2o3défécu3lent_veni2ment_reli2ment_vidi2ment_chlo2r3é2tpu2g3nablechlo2r3a2cryth2ment_o2g3nomonicarê2ment__méta1s2ta_ma2l1aisé_macro1s2célo3quent_tran3s2ats_anti2enne",
|
||||
11 : "_contre1s2cperti3nent_conti3nent__ma2l1a2dro_in2é3lucta_psycho1a2n_dé3s2o3pil’in2é3luctaperma3nent__in2é3narratesta3ment__su2b3liminrésur3gent_’in2é3narraimmis4cent__pro2g3nathchien3dent_sporu4lent_dissi3dent_corpu3lent_archi1é2pissubli2ment_indul3gent_confi3dent__syn2g3nathtrucu3lent_détri3ment_nutri3ment_succu3lent_turbu3lent__pa2r1a2che_pa2r1a2chèfichu3ment_entre3gent_conni3vent_mécon3tent_compé3tent__re4s5trict_dé3s2i3nen_re2s3plend1a2nesthésislalo2ment__dé3s2ensib_re4s5trein_phalan3s2tabsti3nent_",
|
||||
12 : "polyva3lent_équiva4lent_monova3lent_amalga2ment_omnipo3tent__ma2l1a2dreséquipo3tent__dé3s2a3tellproémi3nent_contin3gent_munifi3cent__ma2g3nicideo1s2trictionsurémi3nent_préémi3nent__bai2se3main",
|
||||
13 : "acquies4cent_intelli3gent_tempéra3ment_transpa3rent__ma2g3nificatantifer3ment_",
|
||||
14 : "privatdo3cent_diaphrag2ment_privatdo3zent_ventripo3tent__contre3maître",
|
||||
15 : "grandilo3quent_",
|
||||
16 : "_chè2vre3feuille"
|
||||
}
|
||||
};
|
||||
var h = new window['Hypher'](module.exports);
|
||||
|
||||
if (typeof module.exports.id === 'string') {
|
||||
module.exports.id = [module.exports.id];
|
||||
}
|
||||
|
||||
for (var i = 0; i < module.exports.id.length; i += 1) {
|
||||
window['Hypher']['languages'][module.exports.id[i]] = h;
|
||||
}
|
||||
}());
|
||||
@@ -0,0 +1,216 @@
|
||||
(function () {
|
||||
|
||||
var module = {
|
||||
exports: null
|
||||
};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {!{patterns: !Object, leftmin: !number, rightmin: !number}} language The language pattern file. Compatible with Hyphenator.js.
|
||||
*/
|
||||
function Hypher(language) {
|
||||
var exceptions = [],
|
||||
i = 0;
|
||||
/**
|
||||
* @type {!Hypher.TrieNode}
|
||||
*/
|
||||
this.trie = this.createTrie(language['patterns']);
|
||||
|
||||
/**
|
||||
* @type {!number}
|
||||
* @const
|
||||
*/
|
||||
this.leftMin = language['leftmin'];
|
||||
|
||||
/**
|
||||
* @type {!number}
|
||||
* @const
|
||||
*/
|
||||
this.rightMin = language['rightmin'];
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, !Array.<string>>}
|
||||
*/
|
||||
this.exceptions = {};
|
||||
|
||||
if (language['exceptions']) {
|
||||
exceptions = language['exceptions'].split(/,\s?/g);
|
||||
|
||||
for (; i < exceptions.length; i += 1) {
|
||||
this.exceptions[exceptions[i].replace(/\u2027/g, '').toLowerCase()] = new RegExp('(' + exceptions[i].split('\u2027').join(')(') + ')', 'i');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {{_points: !Array.<number>}}
|
||||
*/
|
||||
Hypher.TrieNode;
|
||||
|
||||
/**
|
||||
* Creates a trie from a language pattern.
|
||||
* @private
|
||||
* @param {!Object} patternObject An object with language patterns.
|
||||
* @return {!Hypher.TrieNode} An object trie.
|
||||
*/
|
||||
Hypher.prototype.createTrie = function (patternObject) {
|
||||
var size = 0,
|
||||
i = 0,
|
||||
c = 0,
|
||||
p = 0,
|
||||
chars = null,
|
||||
points = null,
|
||||
codePoint = null,
|
||||
t = null,
|
||||
tree = {
|
||||
_points: []
|
||||
},
|
||||
patterns;
|
||||
|
||||
for (size in patternObject) {
|
||||
if (patternObject.hasOwnProperty(size)) {
|
||||
patterns = patternObject[size].match(new RegExp('.{1,' + (+size) + '}', 'g'));
|
||||
|
||||
for (i = 0; i < patterns.length; i += 1) {
|
||||
chars = patterns[i].replace(/[0-9]/g, '').split('');
|
||||
points = patterns[i].split(/\D/);
|
||||
t = tree;
|
||||
|
||||
for (c = 0; c < chars.length; c += 1) {
|
||||
codePoint = chars[c].charCodeAt(0);
|
||||
|
||||
if (!t[codePoint]) {
|
||||
t[codePoint] = {};
|
||||
}
|
||||
t = t[codePoint];
|
||||
}
|
||||
|
||||
t._points = [];
|
||||
|
||||
for (p = 0; p < points.length; p += 1) {
|
||||
t._points[p] = points[p] || 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
};
|
||||
|
||||
/**
|
||||
* Hyphenates a text.
|
||||
*
|
||||
* @param {!string} str The text to hyphenate.
|
||||
* @return {!string} The same text with soft hyphens inserted in the right positions.
|
||||
*/
|
||||
Hypher.prototype.hyphenateText = function (str, minLength) {
|
||||
minLength = minLength || 4;
|
||||
|
||||
// Regexp("\b", "g") splits on word boundaries,
|
||||
// compound separators and ZWNJ so we don't need
|
||||
// any special cases for those characters. Unfortunately
|
||||
// it does not support unicode word boundaries, so
|
||||
// we implement it manually.
|
||||
var words = str.split(/([a-zA-Z0-9_\u0027\u00DF-\u00EA\u00EC-\u00EF\u00F1-\u00F6\u00F8-\u00FD\u0101\u0103\u0105\u0107\u0109\u010D\u010F\u0111\u0113\u0117\u0119\u011B\u011D\u011F\u0123\u0125\u012B\u012F\u0131\u0135\u0137\u013C\u013E\u0142\u0144\u0146\u0148\u0151\u0153\u0155\u0159\u015B\u015D\u015F\u0161\u0165\u016B\u016D\u016F\u0171\u0173\u017A\u017C\u017E\u017F\u0219\u021B\u02BC\u0390\u03AC-\u03CE\u03F2\u0401\u0410-\u044F\u0451\u0454\u0456\u0457\u045E\u0491\u0531-\u0556\u0561-\u0587\u0902\u0903\u0905-\u090B\u090E-\u0910\u0912\u0914-\u0928\u092A-\u0939\u093E-\u0943\u0946-\u0948\u094A-\u094D\u0982\u0983\u0985-\u098B\u098F\u0990\u0994-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BE-\u09C3\u09C7\u09C8\u09CB-\u09CD\u09D7\u0A02\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A14-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A82\u0A83\u0A85-\u0A8B\u0A8F\u0A90\u0A94-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABE-\u0AC3\u0AC7\u0AC8\u0ACB-\u0ACD\u0B02\u0B03\u0B05-\u0B0B\u0B0F\u0B10\u0B14-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3E-\u0B43\u0B47\u0B48\u0B4B-\u0B4D\u0B57\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C02\u0C03\u0C05-\u0C0B\u0C0E-\u0C10\u0C12\u0C14-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3E-\u0C43\u0C46-\u0C48\u0C4A-\u0C4D\u0C82\u0C83\u0C85-\u0C8B\u0C8E-\u0C90\u0C92\u0C94-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBE-\u0CC3\u0CC6-\u0CC8\u0CCA-\u0CCD\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D3E-\u0D43\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D60\u0D61\u0D7A-\u0D7F\u1F00-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB2-\u1FB4\u1FB6\u1FB7\u1FBD\u1FBF\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD2\u1FD3\u1FD6\u1FD7\u1FE2-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u200D\u2019]+)/g);
|
||||
|
||||
for (var i = 0; i < words.length; i += 1) {
|
||||
if (words[i].indexOf('/') !== -1) {
|
||||
// Don't insert a zero width space if the slash is at the beginning or end
|
||||
// of the text, or right after or before a space.
|
||||
if (i !== 0 && i !== words.length - 1 && !(/\s+\/|\/\s+/.test(words[i]))) {
|
||||
words[i] += '\u200B';
|
||||
}
|
||||
} else if (words[i].length > minLength) {
|
||||
words[i] = this.hyphenate(words[i]).join('\u00AD');
|
||||
}
|
||||
}
|
||||
return words.join('');
|
||||
};
|
||||
|
||||
/**
|
||||
* Hyphenates a word.
|
||||
*
|
||||
* @param {!string} word The word to hyphenate
|
||||
* @return {!Array.<!string>} An array of word fragments indicating valid hyphenation points.
|
||||
*/
|
||||
Hypher.prototype.hyphenate = function (word) {
|
||||
var characters,
|
||||
characterPoints = [],
|
||||
originalCharacters,
|
||||
i,
|
||||
j,
|
||||
k,
|
||||
node,
|
||||
points = [],
|
||||
wordLength,
|
||||
lowerCaseWord = word.toLowerCase(),
|
||||
nodePoints,
|
||||
nodePointsLength,
|
||||
m = Math.max,
|
||||
trie = this.trie,
|
||||
result = [''];
|
||||
|
||||
if (this.exceptions.hasOwnProperty(lowerCaseWord)) {
|
||||
return word.match(this.exceptions[lowerCaseWord]).slice(1);
|
||||
}
|
||||
|
||||
if (word.indexOf('\u00AD') !== -1) {
|
||||
return [word];
|
||||
}
|
||||
|
||||
word = '_' + word + '_';
|
||||
|
||||
characters = word.toLowerCase().split('');
|
||||
originalCharacters = word.split('');
|
||||
wordLength = characters.length;
|
||||
|
||||
for (i = 0; i < wordLength; i += 1) {
|
||||
points[i] = 0;
|
||||
characterPoints[i] = characters[i].charCodeAt(0);
|
||||
}
|
||||
|
||||
for (i = 0; i < wordLength; i += 1) {
|
||||
node = trie;
|
||||
for (j = i; j < wordLength; j += 1) {
|
||||
node = node[characterPoints[j]];
|
||||
|
||||
if (node) {
|
||||
nodePoints = node._points;
|
||||
if (nodePoints) {
|
||||
for (k = 0, nodePointsLength = nodePoints.length; k < nodePointsLength; k += 1) {
|
||||
points[i + k] = m(points[i + k], nodePoints[k]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < wordLength - 1; i += 1) {
|
||||
if (i > this.leftMin && i < (wordLength - this.rightMin) && points[i] % 2) {
|
||||
result.push(originalCharacters[i]);
|
||||
} else {
|
||||
result[result.length - 1] += originalCharacters[i];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
module.exports = Hypher;
|
||||
window['Hypher'] = module.exports;
|
||||
|
||||
window['Hypher']['languages'] = {};
|
||||
}());(function ($) {
|
||||
$.fn.hyphenate = function (language) {
|
||||
if (window['Hypher']['languages'][language]) {
|
||||
return this.each(function () {
|
||||
var i = 0, len = this.childNodes.length;
|
||||
for (; i < len; i += 1) {
|
||||
if (this.childNodes[i].nodeType === 3) {
|
||||
this.childNodes[i].nodeValue = window['Hypher']['languages'][language].hyphenateText(this.childNodes[i].nodeValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}(jQuery));
|
||||
@@ -1,55 +1,54 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../lib/3rdparty/highlight/styles/default.css">
|
||||
<link rel="stylesheet" href="../css/doctest.css">
|
||||
<script src="../lib/3rdparty/highlight/highlight.pack.js"></script>
|
||||
<script src="all.js"></script>
|
||||
<!-- <script type="text/javascript" src="interface.js"></script> -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="./3rdparty/highlight/styles/default.css">
|
||||
<link rel="stylesheet" href="../css/doctest.css">
|
||||
<script src="./3rdparty/highlight/highlight.pack.js"></script>
|
||||
<script src="../dist/iwmlib.js"></script>
|
||||
<!-- <script type="text/javascript" src="interface.js"></script> -->
|
||||
</head>
|
||||
<body onload="Doctest.run()" >
|
||||
<h1>
|
||||
Application
|
||||
</h1>
|
||||
<p>
|
||||
IWM Browser Applications follow a common three phase pattern, shared by
|
||||
many programming environments as diverse as Processing, Arduino, Intern, etc.
|
||||
<ul>
|
||||
<li>Instantiate: Initialize the application, in this case a singleton and it's instance variables</li>
|
||||
<li>Setup: Build more complex parts of the application, by loading data, creating the UI...</li>
|
||||
<li>Run: Enter and run the main loop of the application.</li>
|
||||
</ul>
|
||||
This pattern is reflected by the IApp Interface:
|
||||
</p>
|
||||
|
||||
<body onload="Doctest.run()">
|
||||
<h1>
|
||||
Application
|
||||
</h1>
|
||||
<p>
|
||||
IWM Browser Applications follow a common three phase pattern, shared by many programming environments as diverse as Processing, Arduino, Intern, etc.
|
||||
<ul>
|
||||
<li>Instantiate: Initialize the application, in this case a singleton and it's instance variables</li>
|
||||
<li>Setup: Build more complex parts of the application, by loading data, creating the UI...</li>
|
||||
<li>Run: Enter and run the main loop of the application.</li>
|
||||
</ul>
|
||||
This pattern is reflected by the IApp Interface:
|
||||
</p>
|
||||
<pre><code class="js">
|
||||
class IApp extends Interface {
|
||||
setup() { return this }
|
||||
run() { return this }
|
||||
}
|
||||
</code></pre>
|
||||
<p>In practice the pattern may be more complex, because the setup phase can only be entered
|
||||
after loading things, a main loop cannot be entered because requirements are not met, etc.
|
||||
But the basic structure is always the same:
|
||||
</p>
|
||||
<script type="module" class="doctest">
|
||||
console.log("Innerhalb script type=module")
|
||||
import App from "./app.js"
|
||||
const app = new App()
|
||||
app.setup()
|
||||
app.run()
|
||||
window.app = app
|
||||
</script>
|
||||
<p>The setup and run methods can also be chained:
|
||||
</p>
|
||||
<script type="module" class="doctest">
|
||||
app.setup().run()
|
||||
</script>
|
||||
<p>In practice the pattern may be more complex, because the setup phase can only be entered after loading things, a main loop cannot be entered because requirements are not met, etc. But the basic structure is always the same:
|
||||
</p>
|
||||
<script type="module" class="doctest">
|
||||
console.log("Innerhalb script type=module")
|
||||
import App from "./app.js"
|
||||
const app = new App()
|
||||
app.setup()
|
||||
app.run()
|
||||
window.app = app
|
||||
</script>
|
||||
<p>The setup and run methods can also be chained:
|
||||
</p>
|
||||
<script type="module" class="doctest">
|
||||
app.setup().run()
|
||||
</script>
|
||||
|
||||
<h2>
|
||||
References
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="https://theintern.github.io/intern/#common-config">Intern. Software testing for humans</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
<h2>
|
||||
References
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="https://theintern.github.io/intern/#common-config">Intern. Software testing for humans</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
@@ -9,16 +9,20 @@ export class IApp extends Interface {
|
||||
/** Build the app by registering event handlers,
|
||||
* adding DOM elements, instanciating templates, etc...
|
||||
*/
|
||||
setup() { return this }
|
||||
setup() {
|
||||
return this
|
||||
}
|
||||
|
||||
/** Run the application by starting a main loop, ...
|
||||
*/
|
||||
run() { return this }
|
||||
run() {
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
export default class App extends Object {
|
||||
/** Override this method to build your app.
|
||||
*/
|
||||
*/
|
||||
setup() {
|
||||
return this
|
||||
}
|
||||
@@ -48,8 +52,7 @@ export default class App extends Object {
|
||||
this.allTests()
|
||||
var end = performance.now()
|
||||
return ['ok', end - start]
|
||||
}
|
||||
catch(e) {
|
||||
} catch (e) {
|
||||
console.trace()
|
||||
return ['Tests failed', e.message]
|
||||
}
|
||||
|
||||
@@ -1,175 +1,275 @@
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
var _createClass = (function() {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i]
|
||||
descriptor.enumerable = descriptor.enumerable || false
|
||||
descriptor.configurable = true
|
||||
if ('value' in descriptor) descriptor.writable = true
|
||||
Object.defineProperty(target, descriptor.key, descriptor)
|
||||
}
|
||||
}
|
||||
return function(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps)
|
||||
if (staticProps) defineProperties(Constructor, staticProps)
|
||||
return Constructor
|
||||
}
|
||||
})()
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError('Cannot call a class as a function')
|
||||
}
|
||||
}
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (!self) {
|
||||
throw new ReferenceError(
|
||||
"this hasn't been initialised - super() hasn't been called"
|
||||
)
|
||||
}
|
||||
return call && (typeof call === 'object' || typeof call === 'function')
|
||||
? call
|
||||
: self
|
||||
}
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== 'function' && superClass !== null) {
|
||||
throw new TypeError(
|
||||
'Super expression must either be null or a function, not ' +
|
||||
typeof superClass
|
||||
)
|
||||
}
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
})
|
||||
if (superClass)
|
||||
Object.setPrototypeOf
|
||||
? Object.setPrototypeOf(subClass, superClass)
|
||||
: (subClass.__proto__ = superClass)
|
||||
}
|
||||
|
||||
var Bootstrap = function (_Object) {
|
||||
_inherits(Bootstrap, _Object);
|
||||
var Bootstrap = (function(_Object) {
|
||||
_inherits(Bootstrap, _Object)
|
||||
|
||||
function Bootstrap() {
|
||||
_classCallCheck(this, Bootstrap);
|
||||
_classCallCheck(this, Bootstrap)
|
||||
|
||||
return _possibleConstructorReturn(this, (Bootstrap.__proto__ || Object.getPrototypeOf(Bootstrap)).apply(this, arguments));
|
||||
return _possibleConstructorReturn(
|
||||
this,
|
||||
(Bootstrap.__proto__ || Object.getPrototypeOf(Bootstrap)).apply(
|
||||
this,
|
||||
arguments
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
_createClass(Bootstrap, null, [{
|
||||
key: 'import',
|
||||
value: function _import(src) {
|
||||
var _this2 = this;
|
||||
_createClass(Bootstrap, null, [
|
||||
{
|
||||
key: 'import',
|
||||
value: function _import(src) {
|
||||
var _this2 = this
|
||||
|
||||
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||
var callback =
|
||||
arguments.length > 1 && arguments[1] !== undefined
|
||||
? arguments[1]
|
||||
: null
|
||||
|
||||
if (src.endsWith('babel.js')) {
|
||||
this.load(this.baseUrl + '/3rdparty/polyfills/babel-polyfill.js', function () {
|
||||
_this2.load(src, null, null);
|
||||
}, null);
|
||||
} else if (this.isModernSafari || this.isModernChrome) {
|
||||
this.load(src, callback);
|
||||
} else {
|
||||
this.load(this.baseUrl + '/3rdparty/systemjs/system.js', function () {
|
||||
SystemJS.config(_this2.systemjsConfig);
|
||||
SystemJS.import(src);
|
||||
}, 'script');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'load',
|
||||
value: function load(src, callback) {
|
||||
var _this3 = this;
|
||||
|
||||
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'module';
|
||||
|
||||
var script = document.createElement('script');
|
||||
if (type === 'module') {
|
||||
script.setAttribute('type', 'module');
|
||||
script.setAttribute('crossorigin', 'use-credentials');
|
||||
}
|
||||
script.onload = function () {
|
||||
if (callback) {
|
||||
callback.call(_this3, script);
|
||||
}
|
||||
};
|
||||
script.src = src;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
}, {
|
||||
key: 'require',
|
||||
value: function require(src) {
|
||||
console.log('Dummy require');
|
||||
}
|
||||
}, {
|
||||
key: 'renderFont',
|
||||
value: function renderFont() {
|
||||
var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Open Sans';
|
||||
var _arr = [300, 400, 600, 700, 800];
|
||||
|
||||
for (var _i = 0; _i < _arr.length; _i++) {
|
||||
var weight = _arr[_i];var _arr2 = ['normal', 'italic'];
|
||||
|
||||
for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
|
||||
var style = _arr2[_i2];
|
||||
var p = document.createElement('p');
|
||||
p.innerHTML = '.';
|
||||
document.body.appendChild(p);
|
||||
p.setAttribute('style', 'font-family: \'' + font + '\'; font-weight: ' + weight + '; font-style: \'' + style + '\'; position: absolute; top: -10000px;');
|
||||
if (src.endsWith('babel.js')) {
|
||||
this.load(
|
||||
this.baseUrl + '/3rdparty/polyfills/babel-polyfill.js',
|
||||
function() {
|
||||
_this2.load(src, null, null)
|
||||
},
|
||||
null
|
||||
)
|
||||
} else if (this.isModernSafari || this.isModernChrome) {
|
||||
this.load(src, callback)
|
||||
} else {
|
||||
this.load(
|
||||
this.baseUrl + '/3rdparty/systemjs/system.js',
|
||||
function() {
|
||||
SystemJS.config(_this2.systemjsConfig)
|
||||
SystemJS.import(src)
|
||||
},
|
||||
'script'
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'isSafari',
|
||||
get: function get() {
|
||||
return (/Safari/.test(navigator.userAgent) && /Apple Computer, Inc/.test(navigator.vendor)
|
||||
);
|
||||
}
|
||||
}, {
|
||||
key: 'isModernSafari',
|
||||
get: function get() {
|
||||
if (!this.isSafari) return false;
|
||||
var agent = navigator.appVersion;
|
||||
var offset = agent.indexOf('Version');
|
||||
if (offset != -1) {
|
||||
var version = parseFloat(agent.substring(offset + 8));
|
||||
return version >= 10.1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}, {
|
||||
key: 'isChrome',
|
||||
get: function get() {
|
||||
var isChromium = window.chrome;
|
||||
var winNav = window.navigator;
|
||||
var vendorName = winNav.vendor;
|
||||
var isOpera = winNav.userAgent.indexOf('OPR') > -1;
|
||||
var isIEedge = winNav.userAgent.indexOf('Edge') > -1;
|
||||
var isIOSChrome = winNav.userAgent.match('CriOS');
|
||||
},
|
||||
{
|
||||
key: 'load',
|
||||
value: function load(src, callback) {
|
||||
var _this3 = this
|
||||
|
||||
if (isIOSChrome) {
|
||||
return true;
|
||||
} else if (isChromium !== null && isChromium !== undefined && vendorName === 'Google Inc.' && isOpera == false && isIEedge == false) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'isModernChrome',
|
||||
get: function get() {
|
||||
if (!this.isChrome) {
|
||||
return false;
|
||||
}
|
||||
var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
|
||||
var version = raw ? parseInt(raw[2], 10) : false;
|
||||
return version > 62;
|
||||
}
|
||||
}, {
|
||||
key: 'systemjsConfig',
|
||||
get: function get() {
|
||||
var type =
|
||||
arguments.length > 2 && arguments[2] !== undefined
|
||||
? arguments[2]
|
||||
: 'module'
|
||||
|
||||
var baseUrl = this.baseUrl;
|
||||
var script = document.createElement('script')
|
||||
if (type === 'module') {
|
||||
script.setAttribute('type', 'module')
|
||||
script.setAttribute('crossorigin', 'use-credentials')
|
||||
}
|
||||
script.onload = function() {
|
||||
if (callback) {
|
||||
callback.call(_this3, script)
|
||||
}
|
||||
}
|
||||
script.src = src
|
||||
document.head.appendChild(script)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'require',
|
||||
value: function require(src) {
|
||||
console.log('Dummy require')
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'renderFont',
|
||||
value: function renderFont() {
|
||||
var font =
|
||||
arguments.length > 0 && arguments[0] !== undefined
|
||||
? arguments[0]
|
||||
: 'Open Sans'
|
||||
var _arr = [300, 400, 600, 700, 800]
|
||||
|
||||
return {
|
||||
baseURL: baseUrl,
|
||||
map: {
|
||||
'plugin-babel': baseUrl + '/3rdparty/systemjs/plugin-babel.js',
|
||||
'systemjs-babel-build': baseUrl + '/3rdparty/systemjs/systemjs-babel-browser.js'
|
||||
},
|
||||
transpiler: 'plugin-babel',
|
||||
meta: {
|
||||
'*.js': {
|
||||
authorization: true,
|
||||
babelOptions: {
|
||||
es2015: false
|
||||
for (var _i = 0; _i < _arr.length; _i++) {
|
||||
var weight = _arr[_i]
|
||||
var _arr2 = ['normal', 'italic']
|
||||
|
||||
for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
|
||||
var style = _arr2[_i2]
|
||||
var p = document.createElement('p')
|
||||
p.innerHTML = '.'
|
||||
document.body.appendChild(p)
|
||||
p.setAttribute(
|
||||
'style',
|
||||
"font-family: '" +
|
||||
font +
|
||||
"'; font-weight: " +
|
||||
weight +
|
||||
"; font-style: '" +
|
||||
style +
|
||||
"'; position: absolute; top: -10000px;"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'isSafari',
|
||||
get: function get() {
|
||||
return (
|
||||
/Safari/.test(navigator.userAgent) &&
|
||||
/Apple Computer, Inc/.test(navigator.vendor)
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'isModernSafari',
|
||||
get: function get() {
|
||||
if (!this.isSafari) return false
|
||||
var agent = navigator.appVersion
|
||||
var offset = agent.indexOf('Version')
|
||||
if (offset != -1) {
|
||||
var version = parseFloat(agent.substring(offset + 8))
|
||||
return version >= 10.1
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'isChrome',
|
||||
get: function get() {
|
||||
var isChromium = window.chrome
|
||||
var winNav = window.navigator
|
||||
var vendorName = winNav.vendor
|
||||
var isOpera = winNav.userAgent.indexOf('OPR') > -1
|
||||
var isIEedge = winNav.userAgent.indexOf('Edge') > -1
|
||||
var isIOSChrome = winNav.userAgent.match('CriOS')
|
||||
|
||||
if (isIOSChrome) {
|
||||
return true
|
||||
} else if (
|
||||
isChromium !== null &&
|
||||
isChromium !== undefined &&
|
||||
vendorName === 'Google Inc.' &&
|
||||
isOpera == false &&
|
||||
isIEedge == false
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'isModernChrome',
|
||||
get: function get() {
|
||||
if (!this.isChrome) {
|
||||
return false
|
||||
}
|
||||
var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)
|
||||
var version = raw ? parseInt(raw[2], 10) : false
|
||||
return version > 62
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'systemjsConfig',
|
||||
get: function get() {
|
||||
var baseUrl = this.baseUrl
|
||||
|
||||
return {
|
||||
baseURL: baseUrl,
|
||||
map: {
|
||||
'plugin-babel':
|
||||
baseUrl + '/3rdparty/systemjs/plugin-babel.js',
|
||||
'systemjs-babel-build':
|
||||
baseUrl +
|
||||
'/3rdparty/systemjs/systemjs-babel-browser.js'
|
||||
},
|
||||
transpiler: 'plugin-babel',
|
||||
meta: {
|
||||
'*.js': {
|
||||
authorization: true,
|
||||
babelOptions: {
|
||||
es2015: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: 'baseUrl',
|
||||
get: function get() {
|
||||
|
||||
var baseUrl = './';
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
var script = scripts[i];
|
||||
var src = script.getAttribute('src');
|
||||
var re = /\/bootstrap(.babel)?\.js$/;
|
||||
if (re.test(src)) {
|
||||
baseUrl = src.replace(re, '');
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'baseUrl',
|
||||
get: function get() {
|
||||
var baseUrl = './'
|
||||
var scripts = document.getElementsByTagName('script')
|
||||
|
||||
return baseUrl;
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
var script = scripts[i]
|
||||
var src = script.getAttribute('src')
|
||||
var re = /\/bootstrap(.babel)?\.js$/
|
||||
if (re.test(src)) {
|
||||
baseUrl = src.replace(re, '')
|
||||
}
|
||||
}
|
||||
|
||||
return baseUrl
|
||||
}
|
||||
}
|
||||
}]);
|
||||
])
|
||||
|
||||
return Bootstrap;
|
||||
}(Object);
|
||||
return Bootstrap
|
||||
})(Object)
|
||||
|
||||
window.Bootstrap = Bootstrap;
|
||||
window.Bootstrap = Bootstrap
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
|
||||
class Bootstrap extends Object {
|
||||
|
||||
static get isSafari() {
|
||||
return /Safari/.test(navigator.userAgent) && /Apple Computer, Inc/.test(navigator.vendor)
|
||||
}
|
||||
|
||||
static get isModernSafari() {
|
||||
if (!this.isSafari)
|
||||
return false
|
||||
if (!this.isSafari) return false
|
||||
let agent = navigator.appVersion
|
||||
let offset = agent.indexOf('Version')
|
||||
if (offset != -1) {
|
||||
@@ -27,7 +24,13 @@ class Bootstrap extends Object {
|
||||
|
||||
if (isIOSChrome) {
|
||||
return true
|
||||
} else if (isChromium !== null && isChromium !== undefined && vendorName === 'Google Inc.' && isOpera == false && isIEedge == false) {
|
||||
} else if (
|
||||
isChromium !== null &&
|
||||
isChromium !== undefined &&
|
||||
vendorName === 'Google Inc.' &&
|
||||
isOpera == false &&
|
||||
isIEedge == false
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
@@ -45,7 +48,6 @@ class Bootstrap extends Object {
|
||||
}
|
||||
|
||||
static get isFirefox() {
|
||||
|
||||
if (window.navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
|
||||
return true
|
||||
}
|
||||
@@ -54,7 +56,6 @@ class Bootstrap extends Object {
|
||||
}
|
||||
|
||||
static get isModernFirefox() {
|
||||
|
||||
if (!this.isFirefox) {
|
||||
return false
|
||||
}
|
||||
@@ -67,26 +68,31 @@ class Bootstrap extends Object {
|
||||
|
||||
static import(src, callback = null) {
|
||||
if (src.endsWith('babel.js')) {
|
||||
this.load(this.baseUrl + '/3rdparty/polyfills/babel-polyfill.js',
|
||||
this.load(
|
||||
this.baseUrl + '/3rdparty/polyfills/babel-polyfill.js',
|
||||
() => {
|
||||
this.load(src, callback, null)
|
||||
},
|
||||
null)
|
||||
}
|
||||
else if (this.isModernSafari || this.isModernChrome || this.isModernFirefox) {
|
||||
null
|
||||
)
|
||||
} else if (this.isModernSafari || this.isModernChrome || this.isModernFirefox) {
|
||||
this.load(src, callback)
|
||||
} else {
|
||||
this.load(this.baseUrl + '/3rdparty/systemjs/system.js', () => {
|
||||
SystemJS.config(this.systemjsConfig)
|
||||
let promise = SystemJS.import(src)
|
||||
if (promise) {
|
||||
promise.then(() => {
|
||||
if (callback) {
|
||||
callback.call(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 'script')
|
||||
this.load(
|
||||
this.baseUrl + '/3rdparty/systemjs/system.js',
|
||||
() => {
|
||||
SystemJS.config(this.systemjsConfig)
|
||||
let promise = SystemJS.import(src)
|
||||
if (promise) {
|
||||
promise.then(() => {
|
||||
if (callback) {
|
||||
callback.call(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
'script'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +116,6 @@ class Bootstrap extends Object {
|
||||
}
|
||||
|
||||
static get systemjsConfig() {
|
||||
|
||||
const baseUrl = this.baseUrl
|
||||
|
||||
return {
|
||||
@@ -132,7 +137,6 @@ class Bootstrap extends Object {
|
||||
}
|
||||
|
||||
static get baseUrl() {
|
||||
|
||||
let baseUrl = './'
|
||||
let scripts = document.getElementsByTagName('script')
|
||||
|
||||
@@ -154,7 +158,10 @@ class Bootstrap extends Object {
|
||||
let p = document.createElement('p')
|
||||
p.innerHTML = '.'
|
||||
document.body.appendChild(p)
|
||||
p.setAttribute('style', `font-family: '${font}'; font-weight: ${weight}; font-style: '${style}'; position: absolute; top: -10000px;`)
|
||||
p.setAttribute(
|
||||
'style',
|
||||
`font-family: '${font}'; font-weight: ${weight}; font-style: '${style}'; position: absolute; top: -10000px;`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,22 +2,65 @@ import App from './app.js'
|
||||
import Doctest from './doctest.js'
|
||||
import Errors from './errors.js'
|
||||
import Events from './events.js'
|
||||
import {DOMFlip, DOMFlippable, CardLoader, PDFLoader, ImageLoader, FrameLoader, HTMLLoader} from './flippable.js'
|
||||
import { DOMFlip, DOMFlippable, CardLoader, PDFLoader, ImageLoader, FrameLoader, HTMLLoader } from './flippable.js'
|
||||
import Index from './index.js'
|
||||
import Interface from './interface.js'
|
||||
import Logging from './logging.js'
|
||||
import Poppable from './poppable.js'
|
||||
import PopupMenu from './popupmenu.js'
|
||||
import Popup from './popup.js'
|
||||
import {IApp} from './app.js'
|
||||
import {Capabilities, CapabilitiesTests} from './capabilities.js'
|
||||
import {EventRecorder} from './events.js'
|
||||
import {FrameContainer, FrameTarget} from './frames.js'
|
||||
import {Inspect} from './inspect.js'
|
||||
import {PointMap, InteractionPoints, Interaction, IInteractionTarget, InteractionDelta, InteractionMapper, InteractionDelegate, IInteractionMapperTarget} from './interaction.js'
|
||||
import {ResizeEvent, DOMScatterContainer, AbstractScatter, DOMScatter, ScatterEvent, BaseEvent} from './scatter.js'
|
||||
import {Cycle, Colors, Elements, Angle, Dates, Points, Polygon, Rect, Sets, Strings, isEmpty, getId, lerp, debounce, randomInt, randomFloat} from './utils.js'
|
||||
import { IApp } from './app.js'
|
||||
import { Capabilities, CapabilitiesTests } from './capabilities.js'
|
||||
import { EventRecorder } from './events.js'
|
||||
import { FrameContainer, FrameTarget } from './frames.js'
|
||||
import { Inspect } from './inspect.js'
|
||||
import {
|
||||
PointMap,
|
||||
InteractionPoints,
|
||||
Interaction,
|
||||
IInteractionTarget,
|
||||
InteractionDelta,
|
||||
InteractionMapper,
|
||||
InteractionDelegate,
|
||||
IInteractionMapperTarget
|
||||
} from './interaction.js'
|
||||
import {
|
||||
ITapDelegate,
|
||||
ResizeEvent,
|
||||
DOMScatterContainer,
|
||||
AbstractScatter,
|
||||
DOMScatter,
|
||||
ScatterEvent,
|
||||
BaseEvent
|
||||
} from './scatter.js'
|
||||
import {
|
||||
Cycle,
|
||||
Colors,
|
||||
Elements,
|
||||
Angle,
|
||||
Dates,
|
||||
Points,
|
||||
Polygon,
|
||||
Rect,
|
||||
Sets,
|
||||
Strings,
|
||||
isEmpty,
|
||||
getId,
|
||||
lerp,
|
||||
debounce,
|
||||
randomInt,
|
||||
randomFloat,
|
||||
LowPassFilter
|
||||
} from './utils.js'
|
||||
import UITest from './uitest.js'
|
||||
|
||||
import Card from './card/card.js'
|
||||
import CardWrapper from './card/wrapper.js'
|
||||
import Highlight from './card/highlight.js'
|
||||
import ScatterCard from './card/scatter.js'
|
||||
import { CardPlugin, CardPluginBase } from './card/plugin.js'
|
||||
import Theme from './card/theme.js'
|
||||
|
||||
/* Needed to ensure that rollup.js includes class definitions and the classes
|
||||
are visible inside doctests.
|
||||
*/
|
||||
@@ -52,6 +95,7 @@ window.FrameTarget = FrameTarget
|
||||
window.IApp = IApp
|
||||
window.IInteractionMapperTarget = IInteractionMapperTarget
|
||||
window.IInteractionTarget = IInteractionTarget
|
||||
window.ITapDelegate = ITapDelegate
|
||||
window.Index = Index
|
||||
window.Inspect = Inspect
|
||||
window.Interaction = Interaction
|
||||
@@ -60,6 +104,8 @@ window.InteractionDelta = InteractionDelta
|
||||
window.InteractionMapper = InteractionMapper
|
||||
window.InteractionPoints = InteractionPoints
|
||||
window.Interface = Interface
|
||||
window.Logging = Logging
|
||||
window.LowPassFilter = LowPassFilter
|
||||
window.PointMap = PointMap
|
||||
window.Rect = Rect
|
||||
window.Points = Points
|
||||
@@ -78,3 +124,11 @@ window.lerp = lerp
|
||||
window.debounce = debounce
|
||||
window.randomInt = randomInt
|
||||
window.randomFloat = randomFloat
|
||||
|
||||
window.CardWrapper = CardWrapper
|
||||
window.Card = Card
|
||||
window.CardPlugin = CardPlugin
|
||||
window.CardPluginBase = CardPluginBase
|
||||
window.ScatterCard = ScatterCard
|
||||
window.Highlight = Highlight
|
||||
window.Theme = Theme
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Doctests Capabilities</title>
|
||||
<link rel="stylesheet" href="../lib/3rdparty/highlight/styles/default.css">
|
||||
<link rel="stylesheet" href="./3rdparty/highlight/styles/default.css">
|
||||
<link rel="stylesheet" href="../css/doctest.css">
|
||||
<script src="../lib/3rdparty/highlight/highlight.pack.js"></script>
|
||||
<script type="text/javascript" src="all.js"></script>
|
||||
<script src="./3rdparty/highlight/highlight.pack.js"></script>
|
||||
<script type="text/javascript" src="../dist/iwmlib.js"></script>
|
||||
</head>
|
||||
<body onload="Doctest.run(); CapabilitiesTests.testAll()">
|
||||
<main>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** Report capabilities with guaranteed values.
|
||||
*/
|
||||
export class Capabilities {
|
||||
|
||||
/** Returns the browser userAgent.
|
||||
@return {string}
|
||||
*/
|
||||
@@ -14,7 +13,7 @@ export class Capabilities {
|
||||
@return {boolean}
|
||||
*/
|
||||
static get isMobile() {
|
||||
return (/Mobi/.test(navigator.userAgent))
|
||||
return /Mobi/.test(navigator.userAgent)
|
||||
}
|
||||
|
||||
/** Tests whether the app is running on a iOS device.
|
||||
@@ -22,7 +21,7 @@ export class Capabilities {
|
||||
@return {boolean}
|
||||
*/
|
||||
static get isIOS() {
|
||||
return (/iPad|iPhone|iPod/.test(navigator.userAgent)) && !window.MSStream
|
||||
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream
|
||||
}
|
||||
|
||||
/** Tests whether the app is running in a Safari environment.
|
||||
@@ -31,16 +30,40 @@ export class Capabilities {
|
||||
@return {boolean}
|
||||
*/
|
||||
static get isSafari() {
|
||||
return navigator.vendor && navigator.vendor.indexOf('Apple') > -1 && navigator.userAgent && !navigator.userAgent.match('CriOS')
|
||||
return (
|
||||
navigator.vendor &&
|
||||
navigator.vendor.indexOf('Apple') > -1 &&
|
||||
navigator.userAgent &&
|
||||
!navigator.userAgent.match('CriOS')
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Distincts if the app is running inside electron or not.
|
||||
*
|
||||
* source: https://discuss.atom.io/t/detect-electron-or-web-page-running/33180/3
|
||||
*
|
||||
* source: https://github.com/cheton/is-electron
|
||||
*/
|
||||
static get isElectron() {
|
||||
return typeof process != 'undefined' && process.versions && process.versions.electron !== undefined
|
||||
// Renderer process
|
||||
if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {
|
||||
return true
|
||||
}
|
||||
|
||||
// Main process
|
||||
if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Detect the user agent when the `nodeIntegration` option is set to true
|
||||
if (
|
||||
typeof navigator === 'object' &&
|
||||
typeof navigator.userAgent === 'string' &&
|
||||
navigator.userAgent.indexOf('Electron') >= 0
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
/** Returns the display resolution. Necessary for retina displays.
|
||||
@@ -54,52 +77,54 @@ export class Capabilities {
|
||||
@return {boolean}
|
||||
*/
|
||||
static get isMultiTouchTable() {
|
||||
return Capabilities.devicePixelRatio > 2 && Capabilities.isMobile === false && /Windows/i.test(Capabilities.userAgent)
|
||||
return (
|
||||
Capabilities.devicePixelRatio > 2 &&
|
||||
Capabilities.isMobile === false &&
|
||||
/Windows/i.test(Capabilities.userAgent)
|
||||
)
|
||||
}
|
||||
|
||||
/** Returns true if mouse events are supported
|
||||
@return {boolean}
|
||||
*/
|
||||
static supportsMouseEvents() {
|
||||
return typeof(window.MouseEvent) != 'undefined'
|
||||
return typeof window.MouseEvent != 'undefined'
|
||||
}
|
||||
|
||||
/** Returns true if touch events are supported
|
||||
@return {boolean}
|
||||
*/
|
||||
static supportsTouchEvents() {
|
||||
return typeof(window.TouchEvent) != 'undefined'
|
||||
return typeof window.TouchEvent != 'undefined'
|
||||
}
|
||||
|
||||
/** Returns true if pointer events are supported
|
||||
@return {boolean}
|
||||
*/
|
||||
static supportsPointerEvents() {
|
||||
return typeof(window.PointerEvent) != 'undefined'
|
||||
return typeof window.PointerEvent != 'undefined'
|
||||
}
|
||||
|
||||
/** Returns true if DOM templates are supported
|
||||
@return {boolean}
|
||||
*/
|
||||
static supportsTemplate() {
|
||||
return 'content' in document.createElement('template');
|
||||
return 'content' in document.createElement('template')
|
||||
}
|
||||
}
|
||||
|
||||
/** Basic tests for Capabilities.
|
||||
*/
|
||||
export class CapabilitiesTests {
|
||||
|
||||
static testConfirm() {
|
||||
let bool = confirm('Please confirm')
|
||||
document.getElementById('demo').innerHTML = (bool) ? 'Confirmed' : 'Not confirmed'
|
||||
document.getElementById('demo').innerHTML = bool ? 'Confirmed' : 'Not confirmed'
|
||||
}
|
||||
|
||||
static testPrompt() {
|
||||
let person = prompt('Please enter your name', 'Harry Potter')
|
||||
if (person != null) {
|
||||
demo.innerHTML =
|
||||
'Hello ' + person + '! How are you today?'
|
||||
demo.innerHTML = 'Hello ' + person + '! How are you today?'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
let _HighlightEnabled = true
|
||||
let _CircleIds = 0
|
||||
|
||||
/** Helper method to round values with one digit precision */
|
||||
function round(value) {
|
||||
return Math.round(parseFloat(value) * 10) / 10
|
||||
}
|
||||
|
||||
/**
|
||||
* A namespace with static functions to expand and shrink highlighted image regions.
|
||||
* Assumes an SVG image with the following structure:
|
||||
*
|
||||
* <svg viewbox="0 0 100 100">
|
||||
* <!-- The defs section must be defined and cannot be generated in JavaScript -->
|
||||
* <defs>
|
||||
* </defs>
|
||||
* <image width="100" height="100" xlink:href="../assets/chess.jpg"/>
|
||||
* <circle onclick="Highlight.animateZoom(event)" cx="47" cy="18" r="8" stroke-width="0.5" />
|
||||
* <circle onclick="Highlight.animateZoom(event)" cx="60" cy="67" r="8" stroke-width="0.5" />
|
||||
* </svg>
|
||||
*
|
||||
* The SVG root element should use a viewbox with 0 0 100 100 to ensure that the positions and size of the
|
||||
* circles can be represented in percent.
|
||||
*
|
||||
* @class Highlight
|
||||
* @extends {Object}
|
||||
*/
|
||||
|
||||
const SCALE = 1.5
|
||||
|
||||
export default class Highlight extends Object {
|
||||
static disableAnimations() {
|
||||
_HighlightEnabled = false
|
||||
let expanded = document.querySelectorAll('.' + this.expandedClass)
|
||||
for (let obj of expanded) {
|
||||
this.shrink(obj)
|
||||
}
|
||||
}
|
||||
|
||||
static enableAnimations() {
|
||||
_HighlightEnabled = true
|
||||
}
|
||||
|
||||
static removeAnimations(svgRoot) {
|
||||
let expanded = svgRoot.querySelectorAll('.' + this.expandedClass)
|
||||
for (let obj of expanded) {
|
||||
TweenLite.set(obj, { scale: 1 })
|
||||
obj.classList.remove('zooming')
|
||||
obj.classList.remove(this.expandedClass)
|
||||
}
|
||||
let defs = svgRoot.querySelector('defs')
|
||||
while (defs.firstChild) {
|
||||
defs.firstChild.remove()
|
||||
}
|
||||
let maskImages = svgRoot.querySelectorAll('.addedImage')
|
||||
for (let m of maskImages) {
|
||||
m.remove()
|
||||
}
|
||||
let circles = svgRoot.querySelectorAll('circle')
|
||||
for (let circle of circles) {
|
||||
if (circle.classList.length == 0) {
|
||||
circle.removeAttribute('class')
|
||||
}
|
||||
if (circle.hasAttribute('id') && circle.getAttribute('id').startsWith('@@')) {
|
||||
circle.removeAttribute('id')
|
||||
}
|
||||
circle.removeAttribute('data-svg-origin')
|
||||
circle.removeAttribute('transform')
|
||||
circle.removeAttribute('style')
|
||||
let cx = circle.getAttribute('cx')
|
||||
let cy = circle.getAttribute('cy')
|
||||
let r = circle.getAttribute('r')
|
||||
circle.setAttribute('cx', round(cx))
|
||||
circle.setAttribute('cy', round(cy))
|
||||
circle.setAttribute('r', round(r))
|
||||
}
|
||||
}
|
||||
|
||||
static expand(obj, { scale = SCALE, duration = 3, stroke = 2, onComplete = null } = {}) {
|
||||
if (obj == null) return
|
||||
//console.log("expand")
|
||||
obj.classList.add('zooming')
|
||||
TweenLite.to(obj, duration, {
|
||||
scale,
|
||||
onUpdate: () => {
|
||||
let scale = obj._gsTransform.scaleX
|
||||
obj.setAttribute('stroke-width', stroke / scale)
|
||||
},
|
||||
onComplete: () => {
|
||||
console.log('expand complete')
|
||||
obj.classList.remove('zooming')
|
||||
obj.classList.add(this.expandedClass)
|
||||
obj.setAttribute('stroke-width', stroke / scale)
|
||||
if (onComplete) onComplete()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static shrink(obj, { duration = 0.5, stroke = 2 } = {}) {
|
||||
//console.log("shrink")
|
||||
if (obj == null) return
|
||||
obj.classList.add('zooming')
|
||||
TweenLite.to(obj, duration, {
|
||||
scale: 1,
|
||||
onUpdate: () => {
|
||||
let scale = obj._gsTransform.scaleX
|
||||
obj.setAttribute('stroke-width', stroke / scale)
|
||||
},
|
||||
onComplete: () => {
|
||||
//console.log("shrink complete")
|
||||
obj.classList.remove('zooming')
|
||||
obj.classList.remove(this.expandedClass)
|
||||
obj.setAttribute('stroke-width', stroke)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static animateCircle(target, callback) {
|
||||
console.log('ANIMATE CIRCLE', this)
|
||||
// ** DEBUG OUTPUTS **
|
||||
|
||||
let circle = target
|
||||
// We need a unique id to ensure correspondence between circle, mask, and maskImage
|
||||
if (!circle.hasAttribute('id')) {
|
||||
_CircleIds += 1
|
||||
circle.setAttribute('id', '@@' + _CircleIds)
|
||||
}
|
||||
let id = circle.getAttribute('id')
|
||||
TweenLite.set(circle, { transformOrigin: '50% 50%' })
|
||||
/*if (circle.classList.contains('zooming')) {
|
||||
console.log("already zooming")
|
||||
return
|
||||
}*/
|
||||
|
||||
let svgRoot = circle.closest('svg')
|
||||
let circleGroup = circle.parentNode
|
||||
let image = svgRoot.querySelector('image')
|
||||
|
||||
let stroke = parseFloat(circleGroup.getAttribute('stroke-width') || 6)
|
||||
|
||||
let defs = svgRoot.querySelector('defs')
|
||||
if (defs == null) {
|
||||
defs = document.createElementNS(svgRoot, 'defs')
|
||||
svgRoot.insertBefore(defs, image)
|
||||
}
|
||||
|
||||
// // We need direct children, therefore we cannot use querySelectorAll
|
||||
let maskImageId = 'maskImage' + id
|
||||
let maskImage = svgRoot.getElementById(maskImageId)
|
||||
|
||||
if (circle.classList.contains(this.expandedClass)) {
|
||||
if (!circle.classList.contains('zooming')) {
|
||||
this.shrink(circle, { stroke })
|
||||
this.shrink(maskImage, { stroke })
|
||||
return
|
||||
}
|
||||
//console.log("animate called while zooming out -> expand")
|
||||
} else if (circle.classList.contains('zooming')) {
|
||||
//console.log("animate called while zooming in -> shrink")
|
||||
this.shrink(circle, { stroke })
|
||||
this.shrink(maskImage, { stroke })
|
||||
return
|
||||
}
|
||||
let circles = Array.from(circleGroup.children).filter(e => e.tagName == 'circle')
|
||||
for (let c of circles) {
|
||||
//console.log("shrinking all circles")
|
||||
this.shrink(c, { stroke })
|
||||
}
|
||||
let maskImages = circleGroup.querySelectorAll('.addedImage')
|
||||
for (let m of maskImages) {
|
||||
this.shrink(m, { stroke })
|
||||
}
|
||||
|
||||
this._createSVGMask(svgRoot, image, id)
|
||||
|
||||
// TweenLite.set(maskImage, { transformOrigin: `${tx}% ${ty}%` })
|
||||
|
||||
this.expand(circle, { stroke, onComplete: callback })
|
||||
this.expand(maskImage)
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
static openHighlight(target, { animation = 0.5, scale = SCALE, onExpanded = null } = {}) {
|
||||
if (this._isExpanded(target)) {
|
||||
console.log('Target is already expanded!')
|
||||
return
|
||||
} else {
|
||||
let targetId = target.getAttribute('id')
|
||||
if (targetId && targetId.startsWith('@@')) {
|
||||
let id = targetId.slice(2)
|
||||
const imageId = '#maskImage' + id
|
||||
const parent = target.parentNode
|
||||
if (parent != null) {
|
||||
let image = parent.querySelector(imageId)
|
||||
if (image) {
|
||||
this._bringToFront(image)
|
||||
} else console.error('Could not find corresponding image element.')
|
||||
} else console.log('Element was no parent:', target)
|
||||
}
|
||||
this._bringToFront(target)
|
||||
let svgRoot = target.closest('svg')
|
||||
if (svgRoot == null) {
|
||||
return
|
||||
}
|
||||
let image = svgRoot.querySelector('image')
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let [mask, maskImage] = this._getSVGMask(target, {
|
||||
svgRoot,
|
||||
image
|
||||
})
|
||||
let center = this._calculateCenterRelativeTo(target, image)
|
||||
console.log('_calculateCenterRelativeTo', center)
|
||||
TweenLite.set(maskImage, {
|
||||
transformOrigin: `${center.x} ${center.y}`
|
||||
})
|
||||
TweenLite.set(target, { transformOrigin: '50% 50%' })
|
||||
|
||||
TweenLite.to([target, maskImage], animation, {
|
||||
scale,
|
||||
onComplete: onExpanded
|
||||
})
|
||||
|
||||
target.classList.add(this.expandedClass)
|
||||
}
|
||||
}
|
||||
|
||||
static toggleHighlight(node, options = {}) {
|
||||
console.log('toggleHighlight', this._isExpanded(node))
|
||||
if (this._isExpanded(node)) {
|
||||
this.closeHighlight(node, options)
|
||||
} else {
|
||||
this.openHighlight(node, options)
|
||||
}
|
||||
}
|
||||
|
||||
static _bringToFront(target) {
|
||||
const parent = target.parentNode
|
||||
if (target && parent) {
|
||||
parent.removeChild(target)
|
||||
parent.appendChild(target)
|
||||
} else console.error('Could not bring to front. Either no target or no parent.', target, parent)
|
||||
}
|
||||
|
||||
static _getSVGMask(circle, { svgRoot = null, image = null } = {}) {
|
||||
const id = this._retrieveId(circle)
|
||||
const maskId = 'mask' + id
|
||||
const maskImageId = 'maskImage' + id
|
||||
|
||||
if (!svgRoot) svgRoot = circle.closest('svg')
|
||||
|
||||
let mask = svgRoot.getElementById(maskId)
|
||||
let maskImage = svgRoot.getElementById(maskImageId)
|
||||
|
||||
if (!mask || !maskImage)
|
||||
[mask, maskImage] = this._createSVGMask(circle, {
|
||||
svgRoot,
|
||||
image,
|
||||
id
|
||||
})
|
||||
|
||||
return [mask, maskImage]
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an SVG mask for a provided svgElement.
|
||||
*
|
||||
* @static
|
||||
* @param {SVGElement} element - Element that should be masked.
|
||||
* @param {object} opts - Optional parameters to avoid unnecessary fetching of elements.
|
||||
* @param {SVGElement} opts.svgRoot - The root <svg> element of the element.
|
||||
* @param {SVGImageElement} opts.image - The image that is used in the mask.
|
||||
* @param {number} opts.id - The id of the mask.
|
||||
* @returns
|
||||
* @memberof Highlight
|
||||
*/
|
||||
static _createSVGMask(element, { svgRoot = null, image = null, id = null } = {}) {
|
||||
// We can fetch these values here, but it's more efficient to
|
||||
// simply pass them in, as it's likely they were already retrieved beforehand.
|
||||
if (svgRoot == null) svgRoot = element.closest('svg')
|
||||
if (image == null) image = svgRoot.querySelector('image')
|
||||
if (id == null) id = this._retrieveId(element)
|
||||
|
||||
let svg = 'http://www.w3.org/2000/svg'
|
||||
let xlink = 'http://www.w3.org/1999/xlink'
|
||||
|
||||
let svgGroup = element.parentNode
|
||||
|
||||
let src = image.getAttributeNS(xlink, 'href')
|
||||
|
||||
let maskId = 'mask' + id
|
||||
let maskImageId = 'maskImage' + id
|
||||
let mask = svgRoot.getElementById(maskId)
|
||||
let maskImage = svgRoot.getElementById(maskImageId)
|
||||
|
||||
let defs = svgRoot.querySelector('defs')
|
||||
if (defs == null) {
|
||||
defs = document.createElementNS(svgRoot, 'defs')
|
||||
svgRoot.insertBefore(defs, image)
|
||||
}
|
||||
|
||||
if (mask == null) {
|
||||
mask = document.createElementNS(svg, 'mask')
|
||||
mask.setAttribute('id', maskId)
|
||||
let maskCircle = element.cloneNode(true)
|
||||
mask.appendChild(maskCircle)
|
||||
defs.appendChild(mask)
|
||||
}
|
||||
|
||||
let bbox = svgRoot.getElementsByTagName('image')[0].getBBox()
|
||||
let width = bbox.width
|
||||
let height = bbox.height
|
||||
|
||||
if (maskImage == null) {
|
||||
maskImage = document.createElementNS(svg, 'image')
|
||||
maskImage.style.pointerEvents = 'none'
|
||||
maskImage.setAttribute('id', maskImageId)
|
||||
maskImage.setAttributeNS(xlink, 'href', src)
|
||||
maskImage.setAttribute('width', width)
|
||||
maskImage.setAttribute('height', height)
|
||||
maskImage.setAttribute('class', 'addedImage')
|
||||
TweenLite.set(maskImage, { scale: 1 })
|
||||
maskImage.style.mask = 'url(#' + maskId + ')'
|
||||
}
|
||||
|
||||
element.insertAdjacentElement('beforebegin', maskImage) // image.nextSibling)
|
||||
// svgGroup.appendChild(element)
|
||||
|
||||
return [mask, maskImage]
|
||||
}
|
||||
|
||||
static _calculateCenterRelativeTo(target, image) {
|
||||
let bbox = image.getBBox()
|
||||
let width = bbox.width
|
||||
let height = bbox.height
|
||||
let cx = target.getAttribute('cx')
|
||||
let cy = target.getAttribute('cy')
|
||||
let x = cx.endsWith('%') ? cx : round((cx / width) * 100) + '%'
|
||||
let y = cy.endsWith('%') ? cy : round((cy / height) * 100) + '%'
|
||||
return { x, y }
|
||||
}
|
||||
|
||||
static _isExpanded(target) {
|
||||
return target.classList.contains(this.expandedClass)
|
||||
}
|
||||
|
||||
static closeHighlight(target, { animation = 0.5 } = {}) {
|
||||
target.classList.remove(this.expandedClass)
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let [mask, maskImage] = this._getSVGMask(target)
|
||||
// console.log('Close Highlight', maskImage)
|
||||
TweenLite.to([target, maskImage], animation, {
|
||||
scale: 1
|
||||
})
|
||||
}
|
||||
|
||||
static animate(event) {
|
||||
if (!_HighlightEnabled) return
|
||||
|
||||
event.stopPropagation()
|
||||
this.animateCircle(event.target)
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
static _retrieveId(target) {
|
||||
let id = target.getAttribute('id')
|
||||
// We need a unique id to ensure correspondence between circle, mask, and maskImage
|
||||
if (!id) {
|
||||
_CircleIds += 1
|
||||
target.setAttribute('id', '@@' + _CircleIds)
|
||||
id = _CircleIds
|
||||
} else {
|
||||
id = parseInt(id.substring(2))
|
||||
}
|
||||
|
||||
return id
|
||||
}
|
||||
}
|
||||
|
||||
Highlight.expandedClass = 'expanded'
|
||||
@@ -0,0 +1,125 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Doctests Cards</title>
|
||||
<link rel="stylesheet" href="../3rdparty/highlight/styles/default.css">
|
||||
<link rel="stylesheet" href="../../css/doctest.css">
|
||||
<link rel="stylesheet" href="../../css/highlight.css">
|
||||
<link rel="stylesheet" href="../../css/popup.css">
|
||||
<script src="../3rdparty/highlight/highlight.pack.js"></script>
|
||||
<script src="../../dist/iwmlib.3rdparty.js"></script>
|
||||
<script src="../../dist/iwmlib.js"></script>
|
||||
</head>
|
||||
|
||||
<body onload="Doctest.run();">
|
||||
<h1>
|
||||
Cards
|
||||
</h1>
|
||||
<p>
|
||||
Cards implement a central UI metaphor for multiuser applications. They allow users to explore information spaces
|
||||
independently from each other. Most of the time a card lives within a scatter and can be moved, rotated, and
|
||||
scaled.
|
||||
The scatter and it's interaction mapper are also responsible to detect and distinguish tap events form other
|
||||
interactions.
|
||||
But in preview programs and editors this is not necessary. Therefore we provide a central CardWrapper class that
|
||||
turns any DOM node into a card.
|
||||
</p>
|
||||
<p>
|
||||
The wrapper's main task is to handle tap events and trigger the corresponding actions. There are three main
|
||||
ways to define these actions.
|
||||
<ol>
|
||||
<li>Define onclick handlers in HTML and SVG, e.g. <code><a onclick="alert(1)">link<a></code>
|
||||
</li>
|
||||
<li>Use onTap with a DOM node as event target, e.g. <code>wrapper.onTap(node, event => {})</code></li>
|
||||
<li>Use onTap with a CSS selector, e.g. <code>wrapper.onTap('.link', event => {})</code></li>
|
||||
</li>
|
||||
</ol>
|
||||
The order in which these possibilities are testet is 1, 2, 3.
|
||||
</p>
|
||||
<p>
|
||||
Note that the objects can also be actived by clicking nearby and not directly on the DOM node.
|
||||
This solves a major problem on large tabletops with a parallaxis in the display.
|
||||
</p>
|
||||
<div class="interactive grayBorder" style="position: relative;">
|
||||
<article id="demoCardWithOnClick"
|
||||
style="position: relative; left: 0%; padding: 16px; margin: 16px; border: 1px solid gray; width: 320px; height: 240px;">
|
||||
<h1 style="color: gray;">A Demo Card with onclick</h1>
|
||||
<figure style="position: relative;">
|
||||
<img width="75%" src="../examples/women.jpeg">
|
||||
<svg class="overlayBase" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"
|
||||
viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
|
||||
<circle cx="35" cy="50" r="35" class="highlight" onclick="alert('Highlight clicked')" stroke="white"
|
||||
fill="transparent" stroke-width="1" />
|
||||
</svg>
|
||||
</figure>
|
||||
<p>Lorem ipsum <a class="link" style="color:blue;" onclick="alert('Link clicked')">dolor</a> sit amet,
|
||||
consetetur sadipscing elitr.</p>
|
||||
</article>
|
||||
|
||||
<article id="demoCardWithSelector"
|
||||
style="position: absolute; left: 50%; top: 0%; padding: 16px; margin: 16px; border: 1px solid gray; width: 320px; height: 240px;">
|
||||
<div class="info-card" style="text-align: center">
|
||||
<h1 style="color: gray;">A Demo Card with selectors</h1>
|
||||
|
||||
<!-- Grr... The viewBox must reflect the width & height, using 0, 0, 100,
|
||||
100 leads to blank spaces -->
|
||||
<svg class="overlayBase" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 268 188"
|
||||
style="width: 180px;" preserveAspectRatio="xMidYMid meet">
|
||||
<defs>
|
||||
</defs>
|
||||
<image xlink:href="../examples/king.jpeg" x="0" y="0" height="188" width="268" />
|
||||
<g>
|
||||
<circle xlink:href="./popup.html" cx="50%" cy="30%" r="25%" class="highlight" stroke="white" fill="transparent"
|
||||
stroke-width="4" />
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
<p>Lorem ipsum <a class="link" href="javascript:alert('Link clicked via href')"
|
||||
style="color:blue;">dolor</a> sit
|
||||
amet,
|
||||
consetetur sadipscing elitr.</p>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<script class="doctest">
|
||||
|
||||
Doctest.expect(ITapDelegate.implementedBy(CardWrapper), true)
|
||||
|
||||
const wrapper1 = new CardWrapper(demoCardWithOnClick)
|
||||
wrapper1.handleClicksAsTaps()
|
||||
|
||||
const wrapper2 = new CardWrapper(demoCardWithSelector)
|
||||
wrapper2.handleClicksAsTaps()
|
||||
wrapper2.onTap('circle', (event, node) => {
|
||||
Card.loadHighlightPopup(event, node)
|
||||
})
|
||||
|
||||
wrapper2.onTap('a', event => {
|
||||
alert('a clicked')
|
||||
})
|
||||
</script>
|
||||
|
||||
<h2>
|
||||
Using Cards within Scatters
|
||||
</h2>
|
||||
<p>Cards can be used within scatters. Since the <code>CardWrapper</code> implements the <code>ITapDelegate</code>
|
||||
protocol they can simply
|
||||
be attached to a DOMScatter object. See the <a href="../scatter.html">Scatter Doctest</a>.
|
||||
</p>
|
||||
<div class="interactive grayBorder" style="position: relative;">
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
References
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="https://uicookies.com/css-card-design/">30 Visually Stunning CSS Cards Inspirations For Every Type
|
||||
Of Websites 2019</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
@@ -0,0 +1,612 @@
|
||||
export var CardPlugin = CardPlugin || {}
|
||||
|
||||
export class CardPluginBase {
|
||||
apply(context) {
|
||||
this.context = context
|
||||
if (this.verify(context)) {
|
||||
this.append(context)
|
||||
console.log('Plugin ' + this.name + ' was verified successfully.')
|
||||
return true
|
||||
} else console.error('Could not verify module ' + this.name + '.')
|
||||
return false
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.constructor.name
|
||||
}
|
||||
|
||||
verify(context) {
|
||||
let funcs = this._getVerificationFunctions(context)
|
||||
for (let func of funcs) {
|
||||
if (!func()) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
_verifyElementsExist(context, ...selectors) {
|
||||
let missing = []
|
||||
|
||||
for (let selector of selectors) {
|
||||
let requiredElement = context.querySelector(selector)
|
||||
if (requiredElement == null) {
|
||||
missing.push(selector)
|
||||
}
|
||||
}
|
||||
const valid = missing.length == 0
|
||||
if (!valid) console.error('Elements were missing: ', missing.join(', '))
|
||||
return valid
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the Plugin to the context.
|
||||
*
|
||||
* @memberof CardPlugin
|
||||
*/
|
||||
append(context) {
|
||||
console.error(
|
||||
'Call of abstract method CardPlugin.prototype.append(context). Plugins need to overwrite the append method!'
|
||||
)
|
||||
}
|
||||
|
||||
_getVerificationFunctions(context) {
|
||||
return [this._verifyContext.bind(this, context), this._verifyRequirements.bind(this, context)]
|
||||
}
|
||||
|
||||
_verifyContext(context) {
|
||||
if (!(context instanceof HTMLElement)) {
|
||||
console.error('Context is not of type HTML Element.', context)
|
||||
return false
|
||||
} else return true
|
||||
}
|
||||
|
||||
_verifyRequirements(context) {
|
||||
let requirements = this._collectAllRequirements()
|
||||
let missing = []
|
||||
|
||||
requirements.forEach(module => {
|
||||
if (context.modules.indexOf(module.name) == -1) {
|
||||
missing.push(module.name)
|
||||
}
|
||||
})
|
||||
|
||||
const valid = missing.length == 0
|
||||
if (!valid)
|
||||
console.error(
|
||||
"Could not apply module '" +
|
||||
this.name +
|
||||
"'. Following modules are required but were missing: " +
|
||||
missing.join(',')
|
||||
)
|
||||
else console.log('All requirements were met! Well done!')
|
||||
return valid
|
||||
}
|
||||
|
||||
_collectAllRequirements() {
|
||||
let requirements = []
|
||||
let klass = this.__proto__
|
||||
while (klass) {
|
||||
if (klass.require != null) {
|
||||
requirements = requirements.concat(klass.require)
|
||||
}
|
||||
klass = klass.__proto__
|
||||
}
|
||||
return requirements
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the card is removed.
|
||||
* Can be used to cleanup the plugin.
|
||||
*
|
||||
* @memberof CardPluginBase
|
||||
*/
|
||||
remove() {}
|
||||
}
|
||||
|
||||
CardPlugin.LightBox = class LightBox extends CardPluginBase {
|
||||
constructor(className, style = {}) {
|
||||
super()
|
||||
this.className = className
|
||||
this.style = style
|
||||
}
|
||||
|
||||
append(context) {
|
||||
let wrapper = document.createElement('div')
|
||||
wrapper.className = this.className
|
||||
|
||||
Object.assign(
|
||||
wrapper.style,
|
||||
{
|
||||
zIndex: 1000,
|
||||
// backgroundColor: "black",
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
},
|
||||
this.style,
|
||||
{
|
||||
display: 'none',
|
||||
position: 'absolute'
|
||||
}
|
||||
)
|
||||
|
||||
context.appendChild(wrapper)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The Enlargeable Overlay module allows the user to click on the thumbnail image,
|
||||
* and the images gets enlarged inside the card.
|
||||
*
|
||||
* @class EnlargeableThumbnail
|
||||
* @extends {CardPlugin}
|
||||
*/
|
||||
CardPlugin.EnlargeableThumbnail = class EnlargeableThumbnail extends CardPluginBase {
|
||||
constructor(
|
||||
wrapperSelector,
|
||||
overlaySelector = null,
|
||||
{ zoomAnimationDuration = 0.4, fadeAnimationDuration = 0.4, interactionType = 'tap' } = {}
|
||||
) {
|
||||
super()
|
||||
this.wrapperSelector = wrapperSelector
|
||||
this.overlaySelector = overlaySelector
|
||||
|
||||
this.zoomAnimationDuration = zoomAnimationDuration
|
||||
this.fadeAnimationDuration = fadeAnimationDuration
|
||||
this.interactionType = interactionType
|
||||
}
|
||||
get require() {
|
||||
return [CardPlugin.LightBox]
|
||||
}
|
||||
|
||||
_getVerificationFunctions(context) {
|
||||
let arr = super._getVerificationFunctions(context)
|
||||
let funcs = [this._verifyElementsExist.bind(this, context, this.wrapperSelector, this.overlaySelector)]
|
||||
return arr.concat(funcs)
|
||||
}
|
||||
|
||||
append(context) {
|
||||
let source = this._retrieveSource(context)
|
||||
this.setupEnlargeableThumbnail(context, source)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the preview image.
|
||||
*
|
||||
* It depends on the fact, that the thumbnail image is in the same directory
|
||||
*
|
||||
*
|
||||
* @param {*} context
|
||||
* @returns
|
||||
* @memberof EnlargeableThumbnail
|
||||
*/
|
||||
_retrieveSource(context) {
|
||||
let img = context.querySelector(this.wrapperSelector + ' img')
|
||||
let src = img.getAttribute('src')
|
||||
let parts = src.split('/')
|
||||
parts.pop()
|
||||
parts.push(parts[parts.length - 1])
|
||||
let imagePath = parts.join('/') + '.jpg'
|
||||
return imagePath
|
||||
}
|
||||
|
||||
setupEnlargeableThumbnail(context, src) {
|
||||
let wrapper = context.querySelector(this.wrapperSelector)
|
||||
let overlay = context.querySelector(this.overlaySelector)
|
||||
|
||||
let icon = document.createElement('div')
|
||||
icon.className = 'button corner-button bottom-right icon zoom'
|
||||
wrapper.appendChild(icon)
|
||||
|
||||
Object.assign(wrapper.style, {
|
||||
cursor: 'pointer'
|
||||
})
|
||||
|
||||
InteractionMapper.on(this.interactionType, wrapper, () => {
|
||||
this.openThumbnailDetail(context, src)
|
||||
})
|
||||
|
||||
InteractionMapper.on(this.interactionType, overlay, () => {
|
||||
this.closeThumnailDetail(context)
|
||||
})
|
||||
}
|
||||
|
||||
openThumbnailDetail(context, src) {
|
||||
let overlay = context.querySelector('.img-overlay')
|
||||
overlay.innerHTML = ''
|
||||
let source = context.querySelector(this.wrapperSelector)
|
||||
let sourceStyle = window.getComputedStyle(source)
|
||||
let imageWrapper = source.cloneNode(true)
|
||||
let image = imageWrapper.querySelector('img')
|
||||
|
||||
Object.assign(imageWrapper.style, {
|
||||
maxWidth: 'none',
|
||||
maxHeight: 'none'
|
||||
})
|
||||
|
||||
Object.assign(image.style, {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
objectFit: 'cover'
|
||||
})
|
||||
|
||||
this._replaceIcon(imageWrapper)
|
||||
|
||||
image.onload = () => {
|
||||
let header = context.querySelector('header')
|
||||
let headerStlye = window.getComputedStyle(header)
|
||||
|
||||
/**
|
||||
* First the maxFillRatio is considered.
|
||||
* It describes how much the image is allowed to exceed the context element.
|
||||
*/
|
||||
const maxFillRatio = 1.5
|
||||
|
||||
/**
|
||||
* The minor side should not exceed the height of the context window.
|
||||
*/
|
||||
const maxMinorSize =
|
||||
context.offsetHeight - 2 * parseInt(headerStlye.paddingTop) - 2 * parseInt(headerStlye.marginTop)
|
||||
|
||||
const max = {
|
||||
width: context.offsetWidth * maxFillRatio,
|
||||
height: context.offsetHeight * maxFillRatio
|
||||
}
|
||||
|
||||
let majorSide
|
||||
let minorSide
|
||||
const _width = { name: 'width', axis: 'x' }
|
||||
const _height = { name: 'height', axis: 'y' }
|
||||
if (image.naturalHeight > image.naturalWidth) {
|
||||
majorSide = _height
|
||||
minorSide = _width
|
||||
} else {
|
||||
majorSide = _width
|
||||
minorSide = _height
|
||||
}
|
||||
|
||||
function capitalize(string) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1)
|
||||
}
|
||||
function getImageSize(side) {
|
||||
return image['natural' + capitalize(side.name)]
|
||||
}
|
||||
|
||||
const majorImageSize = getImageSize(majorSide)
|
||||
// const minorImageSize = getImageSize(minorSide)
|
||||
|
||||
let ratio = getImageSize(minorSide) / getImageSize(majorSide)
|
||||
let size = majorImageSize > max[majorSide.name] ? max[majorSide.name] : majorImageSize
|
||||
|
||||
if (size * ratio > maxMinorSize) {
|
||||
size = maxMinorSize / ratio
|
||||
}
|
||||
|
||||
let targetDimensions = {
|
||||
width: 0,
|
||||
height: 0
|
||||
}
|
||||
|
||||
let position = Points.fromPageToNode(context, Points.fromNodeToPage(source, { x: 0, y: 0 }))
|
||||
|
||||
let targetOffset = {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
|
||||
targetDimensions[majorSide.name] = size
|
||||
targetDimensions[minorSide.name] = size * ratio
|
||||
|
||||
targetOffset[majorSide.axis] =
|
||||
(context['offset' + capitalize(majorSide.name)] - targetDimensions[majorSide.name]) / 2
|
||||
targetOffset[minorSide.axis] =
|
||||
(context['offset' + capitalize(minorSide.name)] - targetDimensions[minorSide.name]) / 2
|
||||
|
||||
overlay.appendChild(imageWrapper)
|
||||
|
||||
TweenMax.set(imageWrapper, {
|
||||
left: 0,
|
||||
top: 0,
|
||||
x: position.x,
|
||||
y: position.y,
|
||||
position: 'absolute',
|
||||
width: parseInt(sourceStyle.width),
|
||||
height: parseInt(sourceStyle.height)
|
||||
})
|
||||
|
||||
TweenMax.set(overlay, {
|
||||
display: 'flex',
|
||||
autoAlpha: 0
|
||||
})
|
||||
|
||||
TweenMax.to(imageWrapper, this.zoomAnimationDuration, {
|
||||
x: targetOffset.x,
|
||||
y: targetOffset.y,
|
||||
width: targetDimensions.width,
|
||||
height: targetDimensions.height
|
||||
})
|
||||
TweenMax.to(overlay, this.fadeAnimationTime, {
|
||||
autoAlpha: 1
|
||||
})
|
||||
}
|
||||
|
||||
image.src = src
|
||||
}
|
||||
|
||||
_replaceIcon(clone) {
|
||||
let zoomIcon = clone.querySelector('.icon.zoom')
|
||||
zoomIcon.classList.remove('zoom')
|
||||
zoomIcon.classList.add('close')
|
||||
}
|
||||
|
||||
getBorderHeight(style) {
|
||||
const borderWidth = parseInt(style.borderTopWidth) + parseInt(style.borderBottomWidth)
|
||||
const padding = parseInt(style.paddingTop) + parseInt(style.paddingBottom)
|
||||
return parseInt(style.width) + borderWidth + padding
|
||||
}
|
||||
|
||||
getBorderWidth(style) {
|
||||
const borderWidth = parseInt(style.borderLeftWidth) + parseInt(style.borderRightWidth)
|
||||
const padding = parseInt(style.paddingLeft) + parseInt(style.paddingRight)
|
||||
return parseInt(style.width) + borderWidth + padding
|
||||
}
|
||||
|
||||
closeThumnailDetail(context) {
|
||||
let overlay = context.querySelector('.img-overlay')
|
||||
|
||||
let timeline = new TimelineLite()
|
||||
|
||||
timeline
|
||||
.to(overlay, this.fadeAnimationDuration, {
|
||||
autoAlpha: 0
|
||||
})
|
||||
.set(overlay, {
|
||||
display: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
CardPlugin.Ui = class UiPlugin extends CardPluginBase {
|
||||
constructor(className, parent = null) {
|
||||
super()
|
||||
this.parent = parent
|
||||
this.className = className
|
||||
}
|
||||
|
||||
_getVerificationFunctions(context) {
|
||||
let arr = super._getVerificationFunctions(context)
|
||||
let func = [this._doesParentExist.bind(this, context, this.parent)]
|
||||
return arr.concat(func)
|
||||
}
|
||||
|
||||
_doesParentExist(context, parent) {
|
||||
if (parent == null) return true
|
||||
let valid = context.querySelector(parent) != null
|
||||
if (!valid) console.error('Could not find parent on context.', context, parent)
|
||||
return valid
|
||||
}
|
||||
|
||||
append(context) {
|
||||
parent = this.parent == null ? context : context.querySelector(this.parent).appendChild(container)
|
||||
let container = document.createElement('div')
|
||||
container.className = this.className
|
||||
parent.appendChild(container)
|
||||
}
|
||||
}
|
||||
|
||||
CardPlugin.Speech = class SpeechPlugin extends CardPluginBase {
|
||||
constructor(parentSelector, className, interactionType = 'tap') {
|
||||
super()
|
||||
this.className = className
|
||||
this.parentSelector = parentSelector
|
||||
this.interactionType = interactionType
|
||||
|
||||
// We directly overwriting the function with a version that has a binded
|
||||
// reference to itself. Doing so provides an easy and reliable way to remove
|
||||
// the event listener using this function. - SO
|
||||
this._domWasChanged = this._domWasChanged.bind(this)
|
||||
|
||||
/*
|
||||
Speech doesn't stop when page is navigated.
|
||||
Therefore we do it manually here.
|
||||
*/
|
||||
window.addEventListener('beforeunload', () => {
|
||||
window.speechSynthesis.cancel()
|
||||
})
|
||||
|
||||
// Binding the function beforehand ensures, that the end function is always the same.
|
||||
this._end = this._end.bind(this)
|
||||
|
||||
this._setupUtterance()
|
||||
this.utterance.addEventListener('end', event => {
|
||||
this._end()
|
||||
})
|
||||
}
|
||||
|
||||
get require() {
|
||||
return [CardPlugin.Ui]
|
||||
}
|
||||
|
||||
subcardChanged(closed) {
|
||||
if (this.cardActive) {
|
||||
this._updateText(closed)
|
||||
}
|
||||
}
|
||||
|
||||
get cardActive() {
|
||||
return this.activeUtterance == this.utterance
|
||||
}
|
||||
|
||||
_updateText(ignoreSubcard = false) {
|
||||
let node = this.context
|
||||
let subcard = node.querySelector('.mainview > .subcard')
|
||||
|
||||
if (ignoreSubcard) {
|
||||
if (subcard != null) {
|
||||
let clone = node.cloneNode(true)
|
||||
let clonedSubcard = clone.querySelector('.mainview > .subcard')
|
||||
clonedSubcard.parentNode.removeChild(clonedSubcard)
|
||||
node = clone
|
||||
}
|
||||
} else {
|
||||
if (subcard) {
|
||||
let clone = subcard.cloneNode(true)
|
||||
clone.querySelectorAll('figure').forEach(figure => {
|
||||
figure.parentNode.removeChild(figure)
|
||||
})
|
||||
|
||||
node = clone
|
||||
}
|
||||
}
|
||||
|
||||
let id = this.context.getAttribute('data-id')
|
||||
let src = this.context.getAttribute('data-source')
|
||||
let subcardSource = null
|
||||
if (subcard != null) {
|
||||
subcardSource = subcard.getAttribute('data-source')
|
||||
}
|
||||
|
||||
if (!window.speechSynthesis.speaking) {
|
||||
this._start(node)
|
||||
Logging.log(`Started speech on card: id:${id} - source: ${src} - subcard: ${subcardSource}`)
|
||||
} else if (this.cardActive && this._sameText(node)) {
|
||||
Logging.log(`Stopped speech on card: id:${id} - source: ${src} - subcard: ${subcardSource}`)
|
||||
this._stop()
|
||||
} else {
|
||||
Logging.log(`Updated Text on card: id:${id} - source: ${src} - subcard: ${subcardSource}`)
|
||||
this._stop()
|
||||
.then(() => {
|
||||
this._start(node)
|
||||
})
|
||||
.catch(console.error)
|
||||
}
|
||||
}
|
||||
|
||||
_sameText(node) {
|
||||
return this.utterance.text == this._cleanupText(node)
|
||||
}
|
||||
|
||||
_setupUtterance() {
|
||||
this.utterance = new SpeechSynthesisUtterance()
|
||||
this.utterance.lang = 'de-DE'
|
||||
}
|
||||
|
||||
get require() {
|
||||
return [CardPlugin.Ui]
|
||||
}
|
||||
|
||||
remove() {
|
||||
this.button = null
|
||||
this._stopThisSpeechIfPlaying()
|
||||
this.context.removeEventListener('DOMNodeRemoved', this._domWasChanged)
|
||||
super.remove()
|
||||
}
|
||||
|
||||
append(context) {
|
||||
let container = context.querySelector(this.parentSelector)
|
||||
this.button = document.createElement('div')
|
||||
this.button.className = 'icon button ' + this.className
|
||||
container.appendChild(this.button)
|
||||
|
||||
InteractionMapper.on(this.interactionType, this.button, () => {
|
||||
this.speak()
|
||||
})
|
||||
|
||||
context.addEventListener('DOMNodeRemoved', this._domWasChanged)
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't remember why this was required - SO 20-11-2019
|
||||
*/
|
||||
_domWasChanged(event) {
|
||||
if (event.target == this.context) this._stopThisSpeechIfPlaying()
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the module if it is set in the context.
|
||||
*/
|
||||
_stopThisSpeechIfPlaying() {
|
||||
if (this.context == null || this.context['lastSpeechNode'] == window.speechSynthesis['speechPluginNode']) {
|
||||
this._stop()
|
||||
}
|
||||
}
|
||||
|
||||
_isSameNode(node) {
|
||||
return this.currentText == node.textContent
|
||||
}
|
||||
|
||||
speak() {
|
||||
/**
|
||||
* This is a little bit ugly, but imho the most elegant of all dirty solutions.
|
||||
*
|
||||
5ht * Within the plugins we have no knowledge of other cards and such. But must differentiate the
|
||||
* clicks by their corresponding owner. The SpeechUtterance just takes a text and has no knowledge
|
||||
* about the node that is currently read to the user.
|
||||
*
|
||||
* This means, that we can identify same text, but not differentiate same text on different nodes.
|
||||
* To account for that, we add the node to the speechSynthesis object (#benefitsOfJavaScript) and
|
||||
* have access to the node, by - let's say - expanding the functionality of the SpeechSynthesis object.
|
||||
*
|
||||
* SO -17.07.19
|
||||
*/
|
||||
|
||||
this._updateText()
|
||||
}
|
||||
|
||||
async _stop() {
|
||||
return new Promise(resolve => {
|
||||
if (this.activeUtterance) {
|
||||
this.activeUtterance.addEventListener('end', resolve, {
|
||||
once: true
|
||||
})
|
||||
}
|
||||
|
||||
window.speechSynthesis.cancel()
|
||||
})
|
||||
}
|
||||
|
||||
get activeUtterance() {
|
||||
return window.speechSynthesis['speechPluginUtterance']
|
||||
}
|
||||
|
||||
_end() {
|
||||
window.speechSynthesis['speechPluginNode'] = null
|
||||
window.speechSynthesis['speechPluginUtterance'] = null
|
||||
this._deactivateButton()
|
||||
this.context.classList.remove('speech-plugin-is-reading')
|
||||
}
|
||||
|
||||
_start(node) {
|
||||
window.speechSynthesis.cancel()
|
||||
|
||||
window.speechSynthesis['speechPluginUtterance'] = this.utterance
|
||||
window.speechSynthesis['speechPluginNode'] = node
|
||||
this.context['lastSpeechNode'] = node
|
||||
|
||||
let cleanText = this._cleanupText(node)
|
||||
this.utterance.text = cleanText
|
||||
window.speechSynthesis.speak(this.utterance)
|
||||
this._activateButton()
|
||||
|
||||
this.context.classList.add('speech-plugin-is-reading')
|
||||
}
|
||||
|
||||
closed() {}
|
||||
|
||||
_cleanupText(node) {
|
||||
let text = node.textContent
|
||||
text = this._removeShy(text)
|
||||
return text
|
||||
}
|
||||
|
||||
_removeShy(text) {
|
||||
return text.replace(/\u00AD/g, '')
|
||||
}
|
||||
|
||||
_activateButton() {
|
||||
if (this.button) this.button.classList.add('active')
|
||||
}
|
||||
_deactivateButton() {
|
||||
if (this.button) this.button.classList.remove('active')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="popupHtml">
|
||||
|
||||
<h1>
|
||||
Popup
|
||||
</h1>
|
||||
<p>
|
||||
Lorem ipsum...
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,162 @@
|
||||
import Card from './card.js'
|
||||
|
||||
/**
|
||||
* Extends the card with scatter functionality.
|
||||
*
|
||||
* @class ScatterCard
|
||||
*/
|
||||
export default class ScatterCard extends Card {
|
||||
/**
|
||||
* TODO: Find a more suitable name.
|
||||
* Adjusts the HTML to work in the new context.
|
||||
*
|
||||
* @static
|
||||
* @param {*} domElement
|
||||
* @param {*} htmlString
|
||||
* @param {*} basePath
|
||||
* @param {*} [opts={}]
|
||||
* @memberof ScatterCard
|
||||
*/
|
||||
static setup(context, htmlString, { basePath = './', modules = [] } = {}) {
|
||||
if (typeof context.scatter == 'undefined') {
|
||||
console.error(
|
||||
"You need to wrap the context inside a DOMScatter before executing the ScatterCard's setup function."
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* This is required for the callback functions to work properly
|
||||
*/
|
||||
window.ScatterCard = ScatterCard
|
||||
|
||||
context.classList.add('info-card')
|
||||
|
||||
this.relativePath = basePath
|
||||
htmlString = this._adjustRelativeLinks(htmlString)
|
||||
|
||||
let parser = new DOMParser()
|
||||
let html = parser.parseFromString(htmlString, 'text/html')
|
||||
|
||||
/**
|
||||
* Conflicts with the FindTarget method of the Abstract scatter.
|
||||
*/
|
||||
this._replaceAttributes(context, html, 'onclick', this._replaceCallback)
|
||||
|
||||
let content = html.querySelector('.mainview')
|
||||
context.appendChild(content)
|
||||
|
||||
super.setup(context, modules)
|
||||
return context
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a scatter for the card and applies the card to it,
|
||||
*
|
||||
* @static
|
||||
* @param {*} html
|
||||
* @param {*} scatterContainer
|
||||
* @param {string} [basePath=""]
|
||||
* @param {*} [opts={}]
|
||||
* @returns
|
||||
* @memberof ScatterCard
|
||||
*/
|
||||
static createCardScatter(html, scatterContainer, { basePath = './', modules = [] } = {}) {
|
||||
let element = document.createElement('div')
|
||||
|
||||
scatterContainer.element.appendChild(element)
|
||||
new DOMScatter(element, scatterContainer, {
|
||||
width: 1400,
|
||||
height: 1200
|
||||
})
|
||||
|
||||
this.setup(element, html, {
|
||||
basePath,
|
||||
modules
|
||||
})
|
||||
return element
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes but NOT removes the scatter element.
|
||||
*
|
||||
* The remove must be called separately, it may be used in the close callback
|
||||
* of the scatter.
|
||||
*/
|
||||
static close(context) {
|
||||
if (typeof context.scatter != 'undefined') context.scatter.close()
|
||||
else {
|
||||
console.error('Expected a scatter element to close!', this)
|
||||
}
|
||||
|
||||
// Card.close(context)
|
||||
|
||||
// if (context['scatter']) {
|
||||
// console.error('CLOSED CARD')
|
||||
// context.scatter.close()
|
||||
// } else {
|
||||
// console.error('Expected a scatter element to close!', this)
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up the card.
|
||||
*
|
||||
* @static
|
||||
* @override
|
||||
* @memberof ScatterCard
|
||||
*/
|
||||
static remove(context) {
|
||||
if (context['scatter']) {
|
||||
context.scatter = null
|
||||
} else {
|
||||
console.error('Expected a scatter element to remove!', this)
|
||||
}
|
||||
|
||||
Card.remove(context)
|
||||
}
|
||||
|
||||
/**
|
||||
*Utility function to create a fully functional card scatter.
|
||||
*
|
||||
* @static
|
||||
* @param {*} scatterContainer
|
||||
* @param {*} path
|
||||
* @param {string} [basePath="."]
|
||||
* @param {*} opts
|
||||
* @returns
|
||||
* @memberof CardScatter
|
||||
*/
|
||||
static loadAndCreateScatterCard(scatterContainer, item, { basePath = '../', modules = [] } = {}) {
|
||||
console.log(basePath)
|
||||
return new Promise((resolve, reject) => {
|
||||
let url = basePath + '/' + item + '/index.html'
|
||||
console.log('Loading', url)
|
||||
this.loadHTML(url)
|
||||
.then(html => {
|
||||
console.log('Received', html)
|
||||
let element = this.createCardScatter(html, scatterContainer, {
|
||||
basePath,
|
||||
modules
|
||||
})
|
||||
resolve(element)
|
||||
})
|
||||
.catch(e => reject(e))
|
||||
})
|
||||
}
|
||||
|
||||
static _setLanguage(context, language) {
|
||||
context.language = language
|
||||
}
|
||||
|
||||
static _getLanguage(context) {
|
||||
return context.language
|
||||
}
|
||||
}
|
||||
|
||||
ScatterCard.selectedLanguage = 0
|
||||
ScatterCard.languages = ['Deutsch', 'English']
|
||||
ScatterCard.languageTags = {
|
||||
Deutsch: 'de',
|
||||
English: 'en'
|
||||
}
|
||||
ScatterCard.scatterContainer = null
|
||||
|
After Width: | Height: | Size: 2.0 MiB |
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<data>
|
||||
<header>
|
||||
<!-- Thumbnail of artwork with 512px large side -->
|
||||
<thumbnail>01/thumbnail.jpg</thumbnail>
|
||||
<!-- <artist> </artist>-->
|
||||
<title>Das Rathaus</title>
|
||||
<!-- <misc>erbaut 1435</misc>-->
|
||||
<description>
|
||||
Das Rathaus ist das wichtigste Gebäude auf dem Marktplatz. Mit dem Bau wurde 1435 begonnen, seitdem wurde es immer wieder verändert, sodass es Merkmale vieler Baustile vom Spätmittelalter bis zum 21. Jahrhundert aufweist. Die auffällige Fassadengestaltung stammt aus dem 19. Jahrhundert.
|
||||
</description>
|
||||
</header>
|
||||
|
||||
<card src="01/01_baugeschichte.xml"/>
|
||||
|
||||
<card src="01/01_funktiondamals.xml"/>
|
||||
|
||||
<card src="01/01_funktionheute.xml"/>
|
||||
|
||||
<card src="01/01_besonderheiten.xml"/>
|
||||
|
||||
<card src="01/01_besonderheiten2.xml"/>
|
||||
|
||||
<card src="01/01_besonderheiten3.xml"/>
|
||||
</data>
|
||||
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html><html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<title data-innerhtml="title">Article with 50% Columns</title>
|
||||
<link rel="stylesheet" href="../_theme/css/bulma.css">
|
||||
<link rel="stylesheet" href="../_theme/css/card.css">
|
||||
<link rel="stylesheet" href="../_theme/css/article.css">
|
||||
<link rel="stylesheet" href="../_theme/css/highlight.css">
|
||||
<link rel="stylesheet" href="../_theme/css/popup.css">
|
||||
<!-- disable zooming -->
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1">
|
||||
<script src="../_theme/js/all.js"></script>
|
||||
<script src="../_theme/js/3rdparty/all.js"></script>
|
||||
<script src="../_theme/js/card.js"></script>
|
||||
<script src="../_theme/js/highlight.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<article>
|
||||
<div class="columns">
|
||||
<div class="column content" data-link="Popup" tabindex=""><h2 contenteditable="false">Tübingen wird Stadt</h2> <p contenteditable="false" data-link="Popup">Bereits 1191 wurden in Tübingen Kaufleute erwähnt – ein Beweis für einen Handelsplatz und der erste Schritt hin zur Stadt. Schon damals dürfte Tübingen städtischen Charakter besessen haben, es wurde jedoch erst 1231 urkundlich als Stadt erwähnt. Das daraufhin erstarkte städtische Selbstbewusstsein und die erhebliche Wirtschaftskraft Tübingens ebneten den Weg für den Bau eines Rathauses, das in mehreren Bauphasen errichtet wurde.</p><h2 contenteditable="false">Bauphasen</h2> <p contenteditable="false" data-link="Popup">1435 Erster Rathausbau</p> <p contenteditable="false" data-link="Popup">1495 Erweiterung um ein Stockwerk</p> <p contenteditable="false" data-link="Popup">1510/11 Einbau der <a href="../01/astronomischeuhr.html" data-highlight-id="" onclick="Card.loadPopup(event)">Astronomischen Uhr</a></p> <p contenteditable="false" data-link="Popup">1543 Erster Rathausanbau an der Haaggasse</p> <p contenteditable="false" data-link="Popup">1598 Einbau des <a href="../01/ziergiebel.html" data-highlight-id="" onclick="Card.loadPopup(event)">Ziergiebels</a></p> <p contenteditable="false" data-link="Popup">1692 Erneute Renovierung</p> <p contenteditable="false" data-link="Popup">1876/77 Anbringung der <a href="../01/vorderheutigenfassade.html" data-highlight-id="" onclick="Card.loadPopup(event)">heutigen Fassade</a></p> <p contenteditable="false" data-link="Popup">1910 Erneuerung des Anbaus an der Haaggasse</p> <p contenteditable="false" data-link="Popup">1965 Grundlegende Sanierungen</p> <p contenteditable="false" data-link="Popup">2016 Grundlegende Sanierungen</p></div>
|
||||
<div class="column content" data-link="Popup" tabindex=""><div class="zoomable-wrapper column" ondragstart="Card.dragStart(event)">
|
||||
<figure style="display: block;" class="zoomable singlefig" id="zoomable1">
|
||||
<div style="position:relative;" class="svg-wrapper">
|
||||
<svg draggable="false" class="mainimg" onclick="Card.openPopupOrZoomable(event)" viewBox="0 0 345 387.5" width="345" height="387.5" contenteditable="false">
|
||||
<!-- The defs section must be defined and cannot be generated in JavaScript-->
|
||||
<defs></defs>
|
||||
<image width="345" height="387.5" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../01/rathauszweigeschossig.png"></image>
|
||||
<g stroke-width="3"></g>
|
||||
</svg>
|
||||
<div class="icon button corner-button bottom-right zoom zoomable-icon" onclick="Card.openZoomable(event)"></div>
|
||||
</div>
|
||||
<figcaption contenteditable="false" class="cap">Erster Rathausbau 15. Jh.</figcaption>
|
||||
<figcaption contenteditable="false" class="zoomcap">Rekonstruktion des Rathauses im 15. Jahrhundert, Stadtarchiv Tübingen</figcaption>
|
||||
</figure>
|
||||
</div><h2 contenteditable="false">Der erste Rathausbau</h2> <p contenteditable="false" data-link="Popup">Um am Marktplatz ein großes <a href="../glossar/rathaus.html" data-highlight-id="" onclick="Card.loadPopup(event)">Rathaus</a> zu errichten, wurden dort wohl mehrere staatliche Bürgerhäuser abgerissen. Der erste Rathausbau 1435 war ein <a href="../glossar/fachwerk.html" data-highlight-id="" onclick="Card.loadPopup(event)">Fachwerkbau</a> mit drei Markthallen im Erdgeschoss und zwei Obergeschossen (siehe Abbildung). Im Erdgeschoss waren Verkaufsstände von Bäckern und Metzgern untergebracht, die sich bis dahin ohne Überdachung im Süden des Platzes befanden. Die Obergeschosse boten Raum für eine Verkaufshalle, die auch für Versammlungen und Feiern benutzt wurde, das Stadtgericht, das bis dahin ebenfalls auf dem Platz „direkt unter den Wolken“ tagte, sowie den Stadtrat.</p></div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
</body></html>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<card type="artist">
|
||||
<!-- <card type="thema"> -->
|
||||
<!-- <card type="details"> -->
|
||||
<!-- <card type="leben des kunstwerks"> -->
|
||||
<!-- <card type="komposition"> -->
|
||||
<!-- <card type="licht und farbe"> -->
|
||||
<!-- <card type="extra info"> -->
|
||||
<h1>Das wichtigste <br/>städtische Gebäude</h1>
|
||||
<preview>
|
||||
<text>
|
||||
Nach 200 Jahren <br/>endlich ein Rathaus
|
||||
</text>
|
||||
</preview>
|
||||
|
||||
<content template="1">
|
||||
<column>
|
||||
<text><![CDATA[
|
||||
<h2>Tübingen wird Stadt</h2>
|
||||
<p>Bereits 1191 wurden in Tübingen Kaufleute erwähnt – ein Beweis für einen Handelsplatz und der erste Schritt hin zur Stadt. Schon damals dürfte Tübingen städtischen Charakter besessen haben, es wurde jedoch erst 1231 urkundlich als Stadt erwähnt. Das daraufhin erstarkte städtische Selbstbewusstsein und die erhebliche Wirtschaftskraft Tübingens ebneten den Weg für den Bau eines Rathauses, das in mehreren Bauphasen errichtet wurde.</p>
|
||||
]]></text>
|
||||
|
||||
|
||||
<text><![CDATA[
|
||||
<h2>Bauphasen</h2>
|
||||
<p>1435 Erster Rathausbau</p>
|
||||
<p>1495 Erweiterung um ein Stockwerk</p>
|
||||
<p>1510/11 Einbau der <a href="01/astronomischeuhr.xml" >Astronomischen Uhr</a></p>
|
||||
<p>1543 Erster Rathausanbau an der Haaggasse</p>
|
||||
<p>1598 Einbau des <a href="01/ziergiebel.xml" >Ziergiebels</a> </p>
|
||||
<p>1692 Erneute Renovierung</p>
|
||||
<p>1876/77 Anbringung der <a href="01/vorderheutigenfassade.xml" >heutigen Fassade</a></p>
|
||||
<p>1910 Erneuerung des Anbaus an der Haaggasse</p>
|
||||
<p>1965 Grundlegende Sanierungen</p>
|
||||
<p>2016 Grundlegende Sanierungen</p>
|
||||
|
||||
]]></text>
|
||||
|
||||
|
||||
|
||||
</column>
|
||||
<column>
|
||||
|
||||
<img src="01/rathauszweigeschossig.png" maxHeight="310" caption="Erster Rathausbau 15. Jh." allowZoom="true" zoomCaption="Rekonstruktion des Rathauses im 15. Jahrhundert, Stadtarchiv Tübingen"/>
|
||||
|
||||
<text><![CDATA[
|
||||
<h2>Der erste Rathausbau</h2>
|
||||
<p>Um am Marktplatz ein großes <a href="glossar/rathaus.xml" >Rathaus</a> zu errichten, wurden dort wohl mehrere staatliche Bürgerhäuser abgerissen. Der erste Rathausbau 1435 war ein <a href="glossar/fachwerk.xml" >Fachwerkbau</a> mit drei Markthallen im Erdgeschoss und zwei Obergeschossen (siehe Abbildung). Im Erdgeschoss waren Verkaufsstände von Bäckern und Metzgern untergebracht, die sich bis dahin ohne Überdachung im Süden des Platzes befanden. Die Obergeschosse boten Raum für eine Verkaufshalle, die auch für Versammlungen und Feiern benutzt wurde, das Stadtgericht, das bis dahin ebenfalls auf dem Platz „direkt unter den Wolken“ tagte, sowie den Stadtrat.</p>
|
||||
]]></text>
|
||||
|
||||
|
||||
|
||||
</column>
|
||||
</content>
|
||||
</card>
|
||||
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html><html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<title data-innerhtml="title">Article with 50% Columns</title>
|
||||
<link rel="stylesheet" href="../_theme/css/bulma.css">
|
||||
<link rel="stylesheet" href="../_theme/css/card.css">
|
||||
<link rel="stylesheet" href="../_theme/css/article.css">
|
||||
<link rel="stylesheet" href="../_theme/css/highlight.css">
|
||||
<link rel="stylesheet" href="../_theme/css/popup.css">
|
||||
<!-- disable zooming -->
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1">
|
||||
<script src="../_theme/js/all.js"></script>
|
||||
<script src="../_theme/js/3rdparty/all.js"></script>
|
||||
<script src="../_theme/js/card.js"></script>
|
||||
<script src="../_theme/js/highlight.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<article>
|
||||
<div class="columns">
|
||||
<div class="column content" data-link="Popup" tabindex=""><h2 contenteditable="false">Die drei Schichten der Fassade</h2> <p contenteditable="false" data-link="Popup">Unter der heutigen Bemalung der Rathausfassade (siehe Abbildung) liegen <a href="../01/malschichten.html" data-highlight-id="" onclick="Card.loadPopup(event)">zwei ältere Malschichten</a>: eine einfache Ausfüllung der Fachwerkfelder und darüber eine <a href="../01/grisaillemalerei.html" data-highlight-id="" onclick="Card.loadPopup(event)">Grisaillemalerei</a>. Sein heutiges Aussehen erhielt das Rathaus 1876 zum 400. Universitätsjubiläum. Nach Entwürfen des Stuttgarter Hochschulprofessors Konrad Dollinger wurde die Fassade von Ludwig Lesker mit <a href="../glossar/sgraffittomalerei.html" data-highlight-id="" onclick="Card.loadPopup(event)">Sgraffittomalerei</a> im Neorenaissance-Stil versehen. Die aufwändige Gestaltung erinnert in Farben und Ornamentik vor allem an das 16. Jahrhundert, eine Blütezeit der Stadt und der Universität.</p> <div style="height: undefinedpx"> </div><div class="zoomable-wrapper column" ondragstart="Card.dragStart(event)">
|
||||
<figure style="display: block;" class="zoomable singlefig" id="zoomable1">
|
||||
<div style="position:relative;" class="svg-wrapper">
|
||||
<svg draggable="false" class="mainimg" onclick="Card.openPopupOrZoomable(event)" viewBox="0 0 594 337.5" width="594" height="337.5" contenteditable="false">
|
||||
<!-- The defs section must be defined and cannot be generated in JavaScript-->
|
||||
<defs></defs>
|
||||
<image width="594" height="337.5" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../01/fassadeneu.jpg"></image>
|
||||
<g stroke-width="3"><circle xlink:href="../01/eberhardfassade.html" data-highlight-id="01.fassadeneu.jpg.h1" onclick="Card.loadHighlightPopup(event)" cx="320" cy="62" r="59"></circle>
|
||||
<circle xlink:href="../01/breuning.html" data-highlight-id="01.fassadeneu.jpg.h2" onclick="Card.loadHighlightPopup(event)" cx="48" cy="199" r="30"></circle>
|
||||
<circle xlink:href="../01/osiander.html" data-highlight-id="01.fassadeneu.jpg.h3" onclick="Card.loadHighlightPopup(event)" cx="155" cy="199" r="30"></circle>
|
||||
<circle xlink:href="../01/dann.html" data-highlight-id="01.fassadeneu.jpg.h4" onclick="Card.loadHighlightPopup(event)" cx="250" cy="199" r="30"></circle>
|
||||
<circle xlink:href="../01/huber.html" data-highlight-id="01.fassadeneu.jpg.h5" onclick="Card.loadHighlightPopup(event)" cx="348" cy="199" r="30"></circle>
|
||||
<circle xlink:href="../01/cotta.html" data-highlight-id="01.fassadeneu.jpg.h6" onclick="Card.loadHighlightPopup(event)" cx="446" cy="199" r="30"></circle>
|
||||
<circle xlink:href="../01/uhland.html" data-highlight-id="01.fassadeneu.jpg.h7" onclick="Card.loadHighlightPopup(event)" cx="541" cy="199" r="30"></circle>
|
||||
<circle xlink:href="../01/gerechtigkeit.html" data-highlight-id="01.fassadeneu.jpg.h8" onclick="Card.loadHighlightPopup(event)" cx="106" cy="275" r="42"></circle>
|
||||
<circle xlink:href="../01/wohlstand.html" data-highlight-id="01.fassadeneu.jpg.h9" onclick="Card.loadHighlightPopup(event)" cx="211" cy="275" r="42"></circle>
|
||||
<circle xlink:href="../01/wissenschaft.html" data-highlight-id="01.fassadeneu.jpg.h10" onclick="Card.loadHighlightPopup(event)" cx="490" cy="275" r="42"></circle></g>
|
||||
</svg>
|
||||
<div class="icon button corner-button bottom-right zoom zoomable-icon" onclick="Card.openZoomable(event)"></div>
|
||||
</div>
|
||||
<figcaption contenteditable="false" class="cap">Die Fassade des Rathauses</figcaption>
|
||||
<figcaption contenteditable="false" class="zoomcap">Die Fassade des Rathauses, Foto: Christoph Jäckle</figcaption>
|
||||
</figure>
|
||||
</div></div>
|
||||
<div class="column content" data-link="Popup" tabindex=""><h2 contenteditable="false">Mutige Männer, allegorische Frauen</h2> <p contenteditable="false" data-link="Popup"><a href="../01/eberhardfassade.html" data-highlight-id="01.fassadeneu.jpg.h1" onclick="Card.loadPopup(event)">Graf Eberhard im Bart</a>, der Gründer der Universität, der für seine Verdienste um die politische Einheit Württembergs in den Herzogsstand erhoben wurde, ist im obersten Geschoss abgebildet. Er wacht als echter Ritter über Stadt und Bürger, das Herzogsschwert und die Gründungsurkunde der Universität in den Händen.</p> <p contenteditable="false" data-link="Popup">Unter ihm sind in sechs Medaillons Porträts wichtiger Männer der Tübinger Stadtgeschichte zu sehen, die sich alle in besonderer Weise um bürgerliche Rechte und Freiheiten verdient gemacht hatten, wie sie bereits im <a href="../glossar/tuebingervertrag.html" data-highlight-id="" onclick="Card.loadPopup(event)">Tübinger Vertrag</a> von 1514 festgelegt wurden. Es handelt sich um den Vogt <a href="../01/breuning.html" data-highlight-id="01.fassadeneu.jpg.h2" onclick="Card.loadPopup(event)">Konrad Breuning</a>, den Diplomaten <a href="../01/osiander.html" data-highlight-id="01.fassadeneu.jpg.h3" onclick="Card.loadPopup(event)">Johannes Osiander</a>, den Bürgermeister <a href="../01/dann.html" data-highlight-id="01.fassadeneu.jpg.h4" onclick="Card.loadPopup(event)">Jakob Heinrich Dann</a>, den Oberamtmann <a href="../01/huber.html" data-highlight-id="01.fassadeneu.jpg.h5" onclick="Card.loadPopup(event)">Johann Ludwig Huber</a>, den Verleger <a href="../01/cotta.html" data-highlight-id="01.fassadeneu.jpg.h6" onclick="Card.loadPopup(event)">Johann Friedrich Cotta</a> und den Politiker <a href="../01/uhland.html" data-highlight-id="01.fassadeneu.jpg.h7" onclick="Card.loadPopup(event)">Ludwig Uhland</a>.</p> <p contenteditable="false" data-link="Popup">Die drei allegorischen Frauenfiguren im untersten Stock symbolisieren die <a href="../01/gerechtigkeit.html" data-highlight-id="01.fassadeneu.jpg.h8" onclick="Card.loadPopup(event)">Gerechtigkeit</a>, den <a href="../01/wohlstand.html" data-highlight-id="01.fassadeneu.jpg.h9" onclick="Card.loadPopup(event)">wirtschaftlichen Wohlstand</a> und die <a href="../01/wissenschaft.html" data-highlight-id="01.fassadeneu.jpg.h10" onclick="Card.loadPopup(event)">Wissenschaft</a>. Während die ersten beiden allgemein städtischbürgerliche Tugenden verkörpern, betont die dritte den Charakter Tübingens als Universitätsstadt.</p></div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
</body></html>
|
||||