diff --git a/.gitignore b/.gitignore index 049d2b66..2dc76baf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ *.pyc *dev.html todo.md - -.DS_Store \ No newline at end of file +.DS_Store +tags diff --git a/.travis.yml b/.travis.yml index 3e9fc008..2a805319 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,24 @@ language: node_js -script: phantomjs tests/run.js + +env: + - TEST_DIVA=source + - TEST_DIVA=build + +install: + - npm install less + - wget http://dl.google.com/closure-compiler/compiler-latest.zip + - unzip compiler-latest.zip + - chmod a+rx compiler.jar + - phantomjs --version + +before_script: ./build.sh all + +script: ./build.sh test + +notifications: + irc: + channels: + - "chat.freenode.net#ddmal" + on_success: change + on_failure: change + skip_join: true diff --git a/AUTHORS b/AUTHORS index 5c8bf8bd..3238e927 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,6 +1,7 @@ Authors of diva.js Wendy Liu (wendy.liu[at]mail.mcgill.ca) +Evan Magoni Andrew Hankinson (andrew.hankinson[at]mail.mcgill.ca) Laurent Pugin (lxpugin[at]gmail.com) diff --git a/LICENSE b/LICENSE index b47f6dff..534259cf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Diva.js -Copyright (C) 2011, 2012 by Wendy Liu, Andrew Hankinson, Laurent Pugin +Copyright (C) 2011-2014 by Wendy Liu, Evan Magoni, Andrew Hankinson, Laurent Pugin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..9596ad13 --- /dev/null +++ b/build.sh @@ -0,0 +1,121 @@ +#!/bin/bash + +# Path to the Closure Compiler .jar file +CLOSURE_COMPILER_PATH="/usr/local/bin/closure-compiler" + +# If running in Travis CI, use local compiler.jar +if [ "$TRAVIS" = "true" ]; then + CLOSURE_COMPILER_PATH="java -jar ../../compiler.jar" +fi + +less () +{ + # Builds the CSS files from the LESS source files. + # Creates a minified version called diva.min.css in build/css + # and a non-minified version called diva.css. + # See build/css/readme.md for more information. + mkdir -p build/css + lessc source/css/imports.less > build/css/diva.css + lessc source/css/imports.less > build/css/diva.min.css -x +} + +minify () +{ + # Builds the minified Javascript files from the source files. + # Creates a minified file called diva.min.js in build/js which contains + # all the relevant Javascript (except for jQuery, which must + # be included separately). + # See build/js/readme.md for more information. + echo "Using Closure path:" $CLOSURE_COMPILER_PATH + + source_files=( "utils.js" "diva.js" "plugins/*" ) + + mkdir -p build/js + cd source/js && eval $CLOSURE_COMPILER_PATH" --js "${source_files[@]:0}" --js_output_file ../../build/js/diva.min.js" + cd ../../ + cp -R source/js/ build/js/ +} + +all () +{ + if [ -d "build" ]; then + echo "Removing old build directory" + rm -r build/* + fi + + mkdir -p build/demo + cp -R source/img build/ + cp -R source/processing build/ + less + minify + cp demo/index.html build/ + cp demo/diva/* build/demo + cp demo/beromunster.json build/demo/ + cp readme.md build/ +} + +test () +{ + if [ "$TEST_DIVA" = "source" ]; then + echo "Testing source" + phantomjs tests/run.js tests/source.html + else + echo "Testing build" + phantomjs tests/run.js + fi +} + +release() +{ + # Creates a zip file containing just the files we need for the release. + VERSION=$1 + if [ -z "$1"]; then + echo "Syntax: ./build.sh release VERSION" + exit 1 + fi + + all + release_dir="diva-"$VERSION + + if [ -d $release_dir ]; then + echo "Release Path exists. Removing." + rm -r $release_dir + fi + + mkdir -p $release_dir + + # Copy all the files over (within loop, $1==source_file, $2==dest_file) + for file in "readme.md readme.md" "AUTHORS AUTHORS" "LICENSE LICENSE" "build/js/ diva.js/js" "build/css/ diva.js/css" "build/img/ diva.js/img" "source/processing/ processing" + do + # parameterize each $file. nb: global positional params get overwritten. + set -- $file + build_path=$release_dir"/"$2 + + if [ -f $1 ]; then + cp $1 $build_path + elif [ -d $1 ]; then + mkdir -p $build_path + cp -R $1 $build_path + else echo "Skipping "$build_path + fi + done + tar -zvcf $release_dir".tar.gz" $release_dir + zip -r $release_dir".zip" $release_dir +} + +case "$1" in + "less" ) less;; + "minify" ) minify;; + "test" ) test;; + "all" ) all;; + "release" ) release $2;; + * ) + echo "Build options:" + echo " all - Builds CSS and Javascript, copies source to build directory" + echo " less - Compiles CSS from the LESS source" + echo " minify - Builds Javascript source" + echo " test - Runs unit tests with PhantomJS" + echo " release VERSION - Builds release package" + ;; +esac + diff --git a/build/css/diva.css b/build/css/diva.css index ad1777b4..862acb9b 100644 --- a/build/css/diva.css +++ b/build/css/diva.css @@ -1,6 +1,5 @@ /* * Inspired by the Twitter bootstrap - * */ .hidden { display: none; @@ -30,6 +29,20 @@ -ms-user-select: none; user-select: none; } +.button { + cursor: pointer; + height: 32px; + width: 32px; + background-color: #f1f1f1; + background-repeat: no-repeat; + background-position: center; + border: 1px solid #99bbe8; +} +@media screen and (min-device-width: 769px) { + .button:hover { + background-color: #fdfdfd; + } +} .diva-title { text-align: center; font-weight: bold; @@ -43,80 +56,78 @@ } .diva-tools .diva-tools-left .diva-slider-label { display: none; - padding: 7px 0px; - clear: both; + padding: 8px; + float: left; + clear: left; +} +.diva-tools .diva-tools-left .diva-zoom-buttons-label { + display: none; + padding: 8px; + float: left; + clear: left; } -.diva-tools .diva-tools-left.diva-fullscreen-space { - margin-left: 40px; +.diva-tools .diva-tools-left .diva-zoom-out-button { + display: none; + float: left; + background-image: url("../img/zoomout.png"); +} +.diva-tools .diva-tools-left .diva-zoom-in-button { + display: none; + float: left; + background-image: url("../img/zoomin.png"); + margin-left: -1px; +} +.diva-tools .diva-tools-left .diva-grid-out-button { + display: none; + float: left; + background-image: url("../img/zoomout.png"); +} +.diva-tools .diva-tools-left .diva-grid-in-button { + display: none; + float: left; + background-image: url("../img/zoomin.png"); + margin-left: -1px; +} +.diva-tools .diva-tools-left .diva-buttons-label { + display: none; + padding: 8px; + float: left; + clear: left; } .diva-tools .diva-tools-left.in-fullscreen { - float: right; - padding-top: 10px; - text-align: right; - clear: both; + float: left; + clear: none; } .diva-tools .diva-tools-right { float: right; height: 42px; - position: relative; - left: 2px; -} -.diva-tools .diva-tools-right .diva-button { - float: right; - cursor: pointer; - height: 32px; - width: 32px; - background-color: #f1f1f1; - background-repeat: no-repeat; - background-position: center; - border: 1px solid #99bbe8; -} -.diva-tools .diva-tools-right .diva-button:hover { - background-color: #fdfdfd; } .diva-tools .diva-tools-right .diva-grid-icon { float: right; - cursor: pointer; - height: 32px; - width: 32px; - background-color: #f1f1f1; - background-repeat: no-repeat; - background-position: center; - border: 1px solid #99bbe8; background-image: url("../img/grid.png"); } -.diva-tools .diva-tools-right .diva-grid-icon:hover { - background-color: #fdfdfd; -} .diva-tools .diva-tools-right .diva-grid-icon.diva-in-grid { background-image: url("../img/document.png"); } .diva-tools .diva-tools-right .diva-link-icon { float: right; - cursor: pointer; - height: 32px; - width: 32px; - background-color: #f1f1f1; - background-repeat: no-repeat; - background-position: center; - border: 1px solid #99bbe8; background-image: url("../img/link.png"); } -.diva-tools .diva-tools-right .diva-link-icon:hover { - background-color: #fdfdfd; -} .diva-tools .diva-tools-right .diva-page-nav { float: left; text-align: right; padding-right: 4px; white-space: nowrap; + line-height: 32px; } .diva-tools .diva-tools-right .diva-page-nav .diva-page-label { - padding-top: 2px; - padding-right: 2px; + float: left; + padding-top: 1px; + padding-right: 0.5em; + line-height: 32px; } .diva-tools .diva-tools-right .diva-page-nav .diva-goto-form { - text-align: right; + float: right; } .diva-tools .diva-tools-right .diva-page-nav .diva-goto-form .diva-input { width: 30px; @@ -129,14 +140,32 @@ top: 0px; right: 30px; z-index: 101; - width: 210px; - padding: 15px 15px 10px 15px; + width: 230px; + height: 73px; + padding: 15px; border: 1px solid #dddddd; background: #ffffff; -webkit-box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5); -moz-box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5); box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5); } +.diva-tools.diva-fullscreen-tools .diva-buttons-label { + margin-top: 5px; + padding: 0; + clear: both; +} +.diva-tools.diva-fullscreen-tools .diva-page-nav { + float: none; + line-height: 1em; +} +.diva-tools.diva-fullscreen-tools .diva-page-nav .diva-goto-form { + margin-top: 9px; +} +.diva-tools.diva-fullscreen-tools .diva-page-nav .diva-page-label { + float: none; + clear: both; + line-height: 1em; +} .diva-outer { clear: both; background: #f1f1f1; @@ -150,6 +179,7 @@ .diva-outer .diva-inner { position: relative; overflow: hidden; + margin: 0 auto; } .diva-outer .diva-inner .diva-page { -webkit-box-shadow: 2px 2px 6px 0 rgba(0, 0, 0, 0.5); @@ -166,7 +196,6 @@ position: absolute; left: 0; right: 0; - margin: 0 auto; } .diva-outer .diva-inner .diva-document-page .diva-page-tools { position: absolute; @@ -181,6 +210,19 @@ width: 25px; cursor: pointer; } +.diva-outer .diva-inner .diva-page-vertical { + margin: 0 auto; + display: inline-block; +} +.diva-outer .diva-inner .diva-page-horizontal { + vertical-align: middle; + display: inline-block; + top: 50%; + transform: translate(0, -50%); + -webkit-transform: translate(0, -50%); + -moz-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); +} .diva-outer .diva-inner .diva-row { position: absolute; width: 100%; @@ -200,25 +242,13 @@ position: fixed !important; top: 0; left: 0; + margin: 0; + border: 0; } .diva-fullscreen-icon { - position: absolute; - z-index: 101; - top: 5px; - left: 5px; - height: 26px; - width: 26px; - cursor: pointer; - background: url("../img/fullscreen.png") no-repeat; -} -.diva-fullscreen-icon:hover { - background-position: -26px 0; -} -.diva-fullscreen-icon.diva-contained { - top: 50px; -} -.diva-fullscreen-icon.diva-in-fullscreen { - position: fixed; + background-image: url("../img/fullscreen.png"); + border-left: 0px; + float: right; } .diva-link-popup { background: #ffffff; @@ -249,45 +279,27 @@ .diva-relative-position { position: relative; } -/* - * Based on the jQuery UI CSS Framework - * Pretty different though. - * - */ -.ui-slider { - display: none; +.zoom-slider { position: relative; - border: 1px solid #dddddd; - background: #fdfdfd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - height: 6px; - width: 100px; - z-index: 1; -} -.ui-slider .ui-slider-handle { - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - border: 1px solid #cccccc; - background: #fdfdfd; - outline: none; - height: 11px; - width: 11px; - z-index: 2; - cursor: default; - position: absolute; - top: -3px; - margin-left: -2px; + top: 0.6em; + display: none; + float: left; } -.ui-slider .ui-slider-handle.hover { - background: #ecf2fb; - border: 1px solid #6f9fdf; +@media (max-width: 480px) { + .zoom-slider { + width: 100px; + } } -.ui-slider .ui-slider-handle.active { - background: #ffffff; - border: 1px solid #99bbe8; +.grid-slider { + position: relative; + top: 0.6em; + display: none; + float: left; +} +@media (max-width: 480px) { + .grid-slider { + width: 100px; + } } .diva-throbber { display: none; @@ -305,6 +317,22 @@ margin-left: -25px; margin-top: -25px; } +.diva-error { + position: absolute; + width: 400px; + height: 200px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5); + -moz-box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5); + box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5); + top: 50%; + left: 50%; + margin-left: -220px; + margin-top: -120px; + z-index: 120; + padding: 0 1em; +} /* Begin canvas plugin */ .diva-canvas-icon { background: url('../img/plugins/canvas.png') no-repeat; diff --git a/build/css/diva.min.css b/build/css/diva.min.css index 8ccfb01f..20758d5f 100644 --- a/build/css/diva.min.css +++ b/build/css/diva.min.css @@ -1 +1 @@ -.hidden{display:none}.grab{cursor:url("../img/openhand.cur"),pointer}.grabbing{cursor:url("../img/closedhand.cur"),move !important}.loading{background:url("../img/loading.gif") no-repeat center}.full-width{width:100% !important;max-width:100% !important}.full-height{height:100% !important;max-height:100% !important}.prevent-selection{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.diva-title{text-align:center;font-weight:bold;font-size:2em}.diva-tools{margin-top:15px}.diva-tools .diva-tools-left{float:left}.diva-tools .diva-tools-left .diva-slider-label{display:none;padding:7px 0;clear:both}.diva-tools .diva-tools-left.diva-fullscreen-space{margin-left:40px}.diva-tools .diva-tools-left.in-fullscreen{float:right;padding-top:10px;text-align:right;clear:both}.diva-tools .diva-tools-right{float:right;height:42px;position:relative;left:2px}.diva-tools .diva-tools-right .diva-button{float:right;cursor:pointer;height:32px;width:32px;background-color:#f1f1f1;background-repeat:no-repeat;background-position:center;border:1px solid #99bbe8}.diva-tools .diva-tools-right .diva-button:hover{background-color:#fdfdfd}.diva-tools .diva-tools-right .diva-grid-icon{float:right;cursor:pointer;height:32px;width:32px;background-color:#f1f1f1;background-repeat:no-repeat;background-position:center;border:1px solid #99bbe8;background-image:url("../img/grid.png")}.diva-tools .diva-tools-right .diva-grid-icon:hover{background-color:#fdfdfd}.diva-tools .diva-tools-right .diva-grid-icon.diva-in-grid{background-image:url("../img/document.png")}.diva-tools .diva-tools-right .diva-link-icon{float:right;cursor:pointer;height:32px;width:32px;background-color:#f1f1f1;background-repeat:no-repeat;background-position:center;border:1px solid #99bbe8;background-image:url("../img/link.png")}.diva-tools .diva-tools-right .diva-link-icon:hover{background-color:#fdfdfd}.diva-tools .diva-tools-right .diva-page-nav{float:left;text-align:right;padding-right:4px;white-space:nowrap}.diva-tools .diva-tools-right .diva-page-nav .diva-page-label{padding-top:2px;padding-right:2px}.diva-tools .diva-tools-right .diva-page-nav .diva-goto-form{text-align:right}.diva-tools .diva-tools-right .diva-page-nav .diva-goto-form .diva-input{width:30px;outline:none;margin:0;padding-top:0}.diva-tools.diva-fullscreen-tools{position:fixed;top:0;right:30px;z-index:101;width:210px;padding:15px 15px 10px 15px;border:1px solid #ddd;background:#fff;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5)}.diva-outer{clear:both;background:#f1f1f1;border:1px solid #99bbe8;position:relative;min-height:100px;min-width:200px;height:700px;overflow:auto}.diva-outer .diva-inner{position:relative;overflow:hidden}.diva-outer .diva-inner .diva-page{-webkit-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);background:url("../img/loading.gif") no-repeat center;position:absolute}.diva-outer .diva-inner .diva-document-page{-webkit-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);background:url("../img/loading.gif") no-repeat center;position:absolute;left:0;right:0;margin:0 auto}.diva-outer .diva-inner .diva-document-page .diva-page-tools{position:absolute;top:-25px;left:0;height:25px;z-index:3}.diva-outer .diva-inner .diva-document-page .diva-page-tools div{display:inline-block;height:25px;width:25px;cursor:pointer}.diva-outer .diva-inner .diva-row{position:absolute;width:100%}.diva-outer .diva-inner.diva-grab{cursor:url("../img/openhand.cur"),pointer}.diva-outer .diva-inner.diva-grabbing{cursor:url("../img/closedhand.cur"),move !important}.diva-outer.diva-fullscreen{width:100% !important;max-width:100% !important;height:100% !important;max-height:100% !important;z-index:100;position:fixed !important;top:0;left:0}.diva-fullscreen-icon{position:absolute;z-index:101;top:5px;left:5px;height:26px;width:26px;cursor:pointer;background:url("../img/fullscreen.png") no-repeat}.diva-fullscreen-icon:hover{background-position:-26px 0}.diva-fullscreen-icon.diva-contained{top:50px}.diva-fullscreen-icon.diva-in-fullscreen{position:fixed}.diva-link-popup{background:#fff;border:1px solid #ddd;height:28px;width:230px;position:absolute;padding:5px;z-index:101;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5)}.diva-link-popup input{width:226px;margin-top:5px}.diva-link-popup input:focus{outline:none}.diva-link-popup.in-fullscreen{top:150px;right:30px}.diva-hide-scrollbar{overflow:hidden !important}.diva-relative-position{position:relative}.ui-slider{display:none;position:relative;border:1px solid #ddd;background:#fdfdfd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;height:6px;width:100px;z-index:1}.ui-slider .ui-slider-handle{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:1px solid #ccc;background:#fdfdfd;outline:none;height:11px;width:11px;z-index:2;cursor:default;position:absolute;top:-3px;margin-left:-2px}.ui-slider .ui-slider-handle.hover{background:#ecf2fb;border:1px solid #6f9fdf}.ui-slider .ui-slider-handle.active{background:#fff;border:1px solid #99bbe8}.diva-throbber{display:none;position:absolute;width:50px;height:50px;background:url("../img/loading.gif") no-repeat center;background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);top:50%;left:50%;margin-left:-25px;margin-top:-25px}.diva-canvas-icon{background:url('../img/plugins/canvas.png') no-repeat;background-position:left center}.diva-canvas-icon:hover{background-position:-25px center}.diva-canvas-icon.new{background-position:-50px center}.diva-canvas-icon.new:hover{background-position:-75px center}#diva-canvas-backdrop{z-index:105;position:fixed;top:0;left:0;bottom:0;right:0;display:none;background:rgba(50,50,50,0.9)}#diva-canvas-tools{color:#333;position:fixed;top:10px;left:10px;width:230px;z-index:108;background:#fff;padding-bottom:10px;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5)}#diva-canvas-tools .action-buttons{clear:both;margin-bottom:5px;text-align:right}#diva-canvas-tools .action-buttons a{color:#333;text-decoration:none;background:#f1f1f1;padding:5px;border:1px solid #99bbe8}#diva-canvas-tools .action-buttons a:last-child{border-left:0}#diva-canvas-tools .action-buttons a:hover{background:#fdfdfd}#diva-canvas-toolbar{height:16px;padding:10px;padding-bottom:0}#diva-canvas-toolbar div{height:18px;width:18px;background-repeat:no-repeat;cursor:pointer;z-index:109;display:inline-block;margin-right:5px;background-image:url("../img/actions.png")}#diva-canvas-toolbar span{vertical-align:top;float:right}#diva-canvas-toolwindow{position:relative;margin:10px}#diva-canvas-close:hover{background-position:-20px 0}#diva-canvas-minimise{background-position:-40px 0}#diva-canvas-minimise:hover{background-position:-60px 0}#diva-canvas-buttons div{cursor:pointer;background-image:url("../img/plugins/canvas-buttons.png");background-repeat:no-repeat;width:20px;height:20px;padding:5px;display:inline-block}#diva-canvas-buttons div.clicked{background-color:#ddd}#diva-canvas-buttons .contrast{background-position:5px 5px}#diva-canvas-buttons .contrast:hover,#diva-canvas-buttons .contrast.clicked{background-position:5px -25px}#diva-canvas-buttons .brightness{background-position:-25px 5px}#diva-canvas-buttons .brightness:hover,#diva-canvas-buttons .brightness.clicked{background-position:-25px -25px}#diva-canvas-buttons .rotation{background-position:-55px 5px}#diva-canvas-buttons .rotation:hover,#diva-canvas-buttons .rotation.clicked{background-position:-55px -25px}#diva-canvas-buttons .zoom{background-position:-85px 5px}#diva-canvas-buttons .zoom:hover,#diva-canvas-buttons .zoom.clicked{background-position:-85px -25px}#diva-canvas-buttons .red{background-position:-115px 5px}#diva-canvas-buttons .red:hover,#diva-canvas-buttons .red.clicked{background-position:-115px -25px}#diva-canvas-buttons .green{background-position:-145px 5px}#diva-canvas-buttons .green:hover,#diva-canvas-buttons .green.clicked{background-position:-145px -25px}#diva-canvas-buttons .blue{background-position:-175px 5px}#diva-canvas-buttons .blue:hover,#diva-canvas-buttons .blue.clicked{background-position:-175px -25px}#diva-canvas-pane{background:#ddd;padding-bottom:10px}#diva-canvas-pane p{margin-left:10px;padding-top:10px}#diva-canvas-pane p .link{cursor:pointer}#diva-canvas-pane p .link:hover{text-decoration:underline}#diva-canvas-mode{text-transform:capitalize}#diva-canvas-slider{width:188px;margin:0 auto;display:block}#diva-canvas-slider .handle{margin-left:-6px}#diva-canvas-minimap{height:210px;width:210px;cursor:crosshair;margin-bottom:10px;background:#000}#diva-canvas{position:absolute;left:0;right:0;margin:0 auto;z-index:107;cursor:url("../img/openhand.cur"),pointer}#diva-map-viewbox{border:2px solid #99bbe8;position:absolute;top:10px;left:10px;cursor:crosshair;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:none}.overflow-hidden{overflow:hidden !important}#diva-canvas-wrapper{z-index:106;position:absolute;top:0;left:0;bottom:0;right:0;overflow:scroll}.canvas-throbber{z-index:110;position:fixed}.diva-download-icon{background:url('../img/plugins/download.png') no-repeat;background-position:left center}.diva-download-icon:hover{background-position:-25px center} \ No newline at end of file +.hidden{display:none}.grab{cursor:url("../img/openhand.cur"),pointer}.grabbing{cursor:url("../img/closedhand.cur"),move !important}.loading{background:url("../img/loading.gif") no-repeat center}.full-width{width:100% !important;max-width:100% !important}.full-height{height:100% !important;max-height:100% !important}.prevent-selection{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.button{cursor:pointer;height:32px;width:32px;background-color:#f1f1f1;background-repeat:no-repeat;background-position:center;border:1px solid #99bbe8}@media screen and (min-device-width:769px){.button:hover{background-color:#fdfdfd}}.diva-title{text-align:center;font-weight:bold;font-size:2em}.diva-tools{margin-top:15px}.diva-tools .diva-tools-left{float:left}.diva-tools .diva-tools-left .diva-slider-label{display:none;padding:8px;float:left;clear:left}.diva-tools .diva-tools-left .diva-zoom-buttons-label{display:none;padding:8px;float:left;clear:left}.diva-tools .diva-tools-left .diva-zoom-out-button{display:none;float:left;background-image:url("../img/zoomout.png")}.diva-tools .diva-tools-left .diva-zoom-in-button{display:none;float:left;background-image:url("../img/zoomin.png");margin-left:-1px}.diva-tools .diva-tools-left .diva-grid-out-button{display:none;float:left;background-image:url("../img/zoomout.png")}.diva-tools .diva-tools-left .diva-grid-in-button{display:none;float:left;background-image:url("../img/zoomin.png");margin-left:-1px}.diva-tools .diva-tools-left .diva-buttons-label{display:none;padding:8px;float:left;clear:left}.diva-tools .diva-tools-left.in-fullscreen{float:left;clear:none}.diva-tools .diva-tools-right{float:right;height:42px}.diva-tools .diva-tools-right .diva-grid-icon{float:right;background-image:url("../img/grid.png")}.diva-tools .diva-tools-right .diva-grid-icon.diva-in-grid{background-image:url("../img/document.png")}.diva-tools .diva-tools-right .diva-link-icon{float:right;background-image:url("../img/link.png")}.diva-tools .diva-tools-right .diva-page-nav{float:left;text-align:right;padding-right:4px;white-space:nowrap;line-height:32px}.diva-tools .diva-tools-right .diva-page-nav .diva-page-label{float:left;padding-top:1px;padding-right:.5em;line-height:32px}.diva-tools .diva-tools-right .diva-page-nav .diva-goto-form{float:right}.diva-tools .diva-tools-right .diva-page-nav .diva-goto-form .diva-input{width:30px;outline:none;margin:0;padding-top:0}.diva-tools.diva-fullscreen-tools{position:fixed;top:0;right:30px;z-index:101;width:230px;height:73px;padding:15px;border:1px solid #ddd;background:#fff;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5)}.diva-tools.diva-fullscreen-tools .diva-buttons-label{margin-top:5px;padding:0;clear:both}.diva-tools.diva-fullscreen-tools .diva-page-nav{float:none;line-height:1em}.diva-tools.diva-fullscreen-tools .diva-page-nav .diva-goto-form{margin-top:9px}.diva-tools.diva-fullscreen-tools .diva-page-nav .diva-page-label{float:none;clear:both;line-height:1em}.diva-outer{clear:both;background:#f1f1f1;border:1px solid #99bbe8;position:relative;min-height:100px;min-width:200px;height:700px;overflow:auto}.diva-outer .diva-inner{position:relative;overflow:hidden;margin:0 auto}.diva-outer .diva-inner .diva-page{-webkit-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);background:url("../img/loading.gif") no-repeat center;position:absolute}.diva-outer .diva-inner .diva-document-page{-webkit-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 6px 0 rgba(0,0,0,0.5);background:url("../img/loading.gif") no-repeat center;position:absolute;left:0;right:0}.diva-outer .diva-inner .diva-document-page .diva-page-tools{position:absolute;top:-25px;left:0;height:25px;z-index:3}.diva-outer .diva-inner .diva-document-page .diva-page-tools div{display:inline-block;height:25px;width:25px;cursor:pointer}.diva-outer .diva-inner .diva-page-vertical{margin:0 auto;display:inline-block}.diva-outer .diva-inner .diva-page-horizontal{vertical-align:middle;display:inline-block;top:50%;transform:translate(0, -50%);-webkit-transform:translate(0, -50%);-moz-transform:translate(0, -50%);-ms-transform:translate(0, -50%)}.diva-outer .diva-inner .diva-row{position:absolute;width:100%}.diva-outer .diva-inner.diva-grab{cursor:url("../img/openhand.cur"),pointer}.diva-outer .diva-inner.diva-grabbing{cursor:url("../img/closedhand.cur"),move !important}.diva-outer.diva-fullscreen{width:100% !important;max-width:100% !important;height:100% !important;max-height:100% !important;z-index:100;position:fixed !important;top:0;left:0;margin:0;border:0}.diva-fullscreen-icon{background-image:url("../img/fullscreen.png");border-left:0;float:right}.diva-link-popup{background:#fff;border:1px solid #ddd;height:28px;width:230px;position:absolute;padding:5px;z-index:101;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5)}.diva-link-popup input{width:226px;margin-top:5px}.diva-link-popup input:focus{outline:none}.diva-link-popup.in-fullscreen{top:150px;right:30px}.diva-hide-scrollbar{overflow:hidden !important}.diva-relative-position{position:relative}.zoom-slider{position:relative;top:.6em;display:none;float:left}@media (max-width:480px){.zoom-slider{width:100px}}.grid-slider{position:relative;top:.6em;display:none;float:left}@media (max-width:480px){.grid-slider{width:100px}}.diva-throbber{display:none;position:absolute;width:50px;height:50px;background:url("../img/loading.gif") no-repeat center;background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);top:50%;left:50%;margin-left:-25px;margin-top:-25px}.diva-error{position:absolute;width:400px;height:200px;background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);top:50%;left:50%;margin-left:-220px;margin-top:-120px;z-index:120;padding:0 1em}.diva-canvas-icon{background:url('../img/plugins/canvas.png') no-repeat;background-position:left center}.diva-canvas-icon:hover{background-position:-25px center}.diva-canvas-icon.new{background-position:-50px center}.diva-canvas-icon.new:hover{background-position:-75px center}#diva-canvas-backdrop{z-index:105;position:fixed;top:0;left:0;bottom:0;right:0;display:none;background:rgba(50,50,50,0.9)}#diva-canvas-tools{color:#333;position:fixed;top:10px;left:10px;width:230px;z-index:108;background:#fff;padding-bottom:10px;-webkit-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);-moz-box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5);box-shadow:2px 2px 4px 0 rgba(0,0,0,0.5)}#diva-canvas-tools .action-buttons{clear:both;margin-bottom:5px;text-align:right}#diva-canvas-tools .action-buttons a{color:#333;text-decoration:none;background:#f1f1f1;padding:5px;border:1px solid #99bbe8}#diva-canvas-tools .action-buttons a:last-child{border-left:0}#diva-canvas-tools .action-buttons a:hover{background:#fdfdfd}#diva-canvas-toolbar{height:16px;padding:10px;padding-bottom:0}#diva-canvas-toolbar div{height:18px;width:18px;background-repeat:no-repeat;cursor:pointer;z-index:109;display:inline-block;margin-right:5px;background-image:url("../img/actions.png")}#diva-canvas-toolbar span{vertical-align:top;float:right}#diva-canvas-toolwindow{position:relative;margin:10px}#diva-canvas-close:hover{background-position:-20px 0}#diva-canvas-minimise{background-position:-40px 0}#diva-canvas-minimise:hover{background-position:-60px 0}#diva-canvas-buttons div{cursor:pointer;background-image:url("../img/plugins/canvas-buttons.png");background-repeat:no-repeat;width:20px;height:20px;padding:5px;display:inline-block}#diva-canvas-buttons div.clicked{background-color:#ddd}#diva-canvas-buttons .contrast{background-position:5px 5px}#diva-canvas-buttons .contrast:hover,#diva-canvas-buttons .contrast.clicked{background-position:5px -25px}#diva-canvas-buttons .brightness{background-position:-25px 5px}#diva-canvas-buttons .brightness:hover,#diva-canvas-buttons .brightness.clicked{background-position:-25px -25px}#diva-canvas-buttons .rotation{background-position:-55px 5px}#diva-canvas-buttons .rotation:hover,#diva-canvas-buttons .rotation.clicked{background-position:-55px -25px}#diva-canvas-buttons .zoom{background-position:-85px 5px}#diva-canvas-buttons .zoom:hover,#diva-canvas-buttons .zoom.clicked{background-position:-85px -25px}#diva-canvas-buttons .red{background-position:-115px 5px}#diva-canvas-buttons .red:hover,#diva-canvas-buttons .red.clicked{background-position:-115px -25px}#diva-canvas-buttons .green{background-position:-145px 5px}#diva-canvas-buttons .green:hover,#diva-canvas-buttons .green.clicked{background-position:-145px -25px}#diva-canvas-buttons .blue{background-position:-175px 5px}#diva-canvas-buttons .blue:hover,#diva-canvas-buttons .blue.clicked{background-position:-175px -25px}#diva-canvas-pane{background:#ddd;padding-bottom:10px}#diva-canvas-pane p{margin-left:10px;padding-top:10px}#diva-canvas-pane p .link{cursor:pointer}#diva-canvas-pane p .link:hover{text-decoration:underline}#diva-canvas-mode{text-transform:capitalize}#diva-canvas-slider{width:188px;margin:0 auto;display:block}#diva-canvas-slider .handle{margin-left:-6px}#diva-canvas-minimap{height:210px;width:210px;cursor:crosshair;margin-bottom:10px;background:#000}#diva-canvas{position:absolute;left:0;right:0;margin:0 auto;z-index:107;cursor:url("../img/openhand.cur"),pointer}#diva-map-viewbox{border:2px solid #99bbe8;position:absolute;top:10px;left:10px;cursor:crosshair;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:none}.overflow-hidden{overflow:hidden !important}#diva-canvas-wrapper{z-index:106;position:absolute;top:0;left:0;bottom:0;right:0;overflow:scroll}.canvas-throbber{z-index:110;position:fixed}.diva-download-icon{background:url('../img/plugins/download.png') no-repeat;background-position:left center}.diva-download-icon:hover{background-position:-25px center} \ No newline at end of file diff --git a/build/demo/highlight.html b/build/demo/highlight.html index 23b156cd..11c7954a 100644 --- a/build/demo/highlight.html +++ b/build/demo/highlight.html @@ -9,24 +9,19 @@ - - - - - - @@ -29,4 +28,4 @@
-