Interactive interface for browsing global, full-resolution satellite imagery
Modal with tiles
Taylor Gunnoe9028b6e82214
diff --git a/web/css/bank.css b/web/css/bank.cssindex 6c1a6f2d1..206320ac9 100644--- a/web/css/bank.css+++ b/web/css/bank.css@@ -1,6 +1,8 @@/*canvas {float:left;}*/.toggleButtonHolder{-+ position:absolute;+ right:0;+ top:0;}a.accordionToggler {@@ -53,8 +55,6 @@ a.atcollapse {background: 50% 50% no-repeat url("../images/angle-double-up.png");border-radius:0;box-sizing: border-box;- position: absolute;- right: 0;border-right: 0;padding: 10px;}@@ -63,32 +63,65 @@ a.atcollapse:hover{background-color:#fff;cursor:pointer;}-a.atexpand {background-image: url("../images/angle-double-down.png");}-.bank{color:#222;}-.bank h1,h2,h3,h4 {margin:0px; padding:0px; color:#000; font-weight:400;}-.bank h2 {font-size:1.4em; display:inline-block; float: left; color:#ffffff; border:none; padding:9px 30px 9px 30px;-background: -moz-linear-gradient(top, rgba(255,255,255,0.7) 0%, rgba(11,95,160,0.7) 23%, rgba(0,88,156,0.7) 24%, rgba(0,81,144,0.7) 99%, rgba(0,81,144,0.7) 100%); /* FF3.6+ */-background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.7)), color-stop(23%,rgba(11,95,160,0.7)), color-stop(24%,rgba(0,88,156,0.7)), color-stop(99%,rgba(0,81,144,0.7)), color-stop(100%,rgba(0,81,144,0.7))); /* Chrome,Safari4+ */-background: -webkit-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Chrome10+,Safari5.1+ */-background: -o-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Opera 11.10+ */-background: -ms-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* IE10+ */-background: linear-gradient(to bottom, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* W3C */-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', endColorstr='#b3005190',GradientType=0 ); /* IE6-9 */-+a.atexpand {+ background-image: url("../images/angle-double-down.png");+}+.bank {+ color:#222;+}+.bank h1,h2,h3,h4 {+ margin:0px;+ padding:0px;+ color:#000;+ font-weight:400;+}+.bank h2 {+ font-size:1.4em;+ display:inline-block;+ float: left;+ color:#ffffff;+ border:none;+ padding:9px 30px 9px 30px;}-.bank .tabContainer {border-bottom: 2px #005190 solid; }-.bank h3 {display:block; color:#ffffff; font-size: 1em; border:none; text-decoration:none; width:98%;}-#callSelectorLink {display: inline-block; width:32px; height:32px; background: transparent url("../images/addLayers.png"); margin-left: 50px;float:right;}-.bank div,.bank ul {display:block;width:100%; margin:0 auto;}-.bank .category {overflow:hidden;}-.bank h3 {background: none; padding: 1px 3px; font-size:0.9em; margin-top:10px; margin-left:2%;text-transform:uppercase;}+.bank .tabContainer {+ border-bottom: 2px #005190 solid;+}+.bank h3 {+ display:block;+ color:#ffffff;+ font-size: 1em;+ border:none;+ text-decoration:none;+}+#callSelectorLink {+ display: inline-block;+ width:32px;+ height:32px;+ background: transparent url("../images/addLayers.png");+ margin-left: 50px;+ float:right;+}+.bank div,.bank ul {+ display:block;+ width:100%;+ margin:0 auto;+}+.bank .category {+ overflow:hidden;+}+.bank h3 {+ background: none;+ padding: 1px 3px;+ font-size:0.9em;+ margin-top:10px;+ margin-left:2%;+ text-transform:uppercase;+}.bank li.item {padding:6px 0;overflow:hidden;- /*background: rgba(220,220,220,1);*/cursor:move;- /*margin:5px 2% 0 2%;*/margin: 0 auto;}@@ -100,31 +133,76 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', ebackground: rgba(220,220,220,1);}-.categoryContainer { display:block; width:100%; overflow:hidden;}+.categoryContainer {+ display:block;+ width:100%;+ overflow:hidden;+}-.mCustomScrollBox > .mCSB_scrollTools {right: -6px;}+.mCustomScrollBox > .mCSB_scrollTools {+ right: -6px;+}/* HACK: McGann, triage */-.bank li.item a { color: #22a; }-.bank li.item a:hover { color: #88f; }+.bank li.item a {+ color: #22a;+}+.bank li.item a:hover {+ color: #88f;+}-#selectorboxcontent a { color: #22a; }-#selectorboxcontent a:hover { color: #88f; }+#selectorboxcontent a {+ color: #22a;+}+#selectorboxcontent a:hover {+ color: #88f;+}/* HACK : End */-.bank li.item h4 {font-size:0.85em; padding:0 3px;}-.bank li.item p {padding:0 3px; color:#222; font-size:0.78em; font-style:italic;}-.bank li.item span.palette {display:block; overflow:hidden; margin-top:5px; margin-left:5px;}-.bank li.item ul.palette li {float:left;}-.bank ul.category { overflow:auto; }-.bank ul.category li h3 {display:block; clear:both; float:none;}-img.bank-item-img { display:block;}-img.hideReg { height: 14px; width: 20px; }-.bank img.close { height: 14px; width: 14px; }--+.bank li.item h4 {+ font-size:0.85em;+ padding:0 3px;+}+.bank li.item p {+ padding:0 3px;+ color:#222;+ font-size:0.78em;+ font-style:italic;+}+.bank li.item span.palette {+ display:block;+ overflow:hidden;+ margin-top:5px;+ margin-left:5px;+}+.bank li.item ul.palette li {+ float:left;+}+.bank ul.category {+ overflow:auto;+}+.bank ul.category li h3 {+ display:block;+ clear:both;+ float:none;+}+img.bank-item-img {+ display:block;+}+img.hideReg {+ height: 14px;+ width: 20px;+}+.bank img.close {+ height: 14px;+ width: 14px;+}-.ui-tabs-hide {/*display:none !important;*/ position:absolute !important; left:-999em !important;}+.ui-tabs-hide {+ /*display:none !important;*/+ position:absolute !important;+ left:-999em !important;+}.jspPane {margin-left: 0 !important;@@ -275,4 +353,8 @@ i.wv-layers-options-icon{}.bank li.layer-hidden a {color: #999;+}+.state-saver{+ background:rgba(220,220,0,0.3);+ height:42px;}\ No newline at end of filediff --git a/web/css/wv.layers.modal.css b/web/css/wv.layers.modal.cssindex 6489ea8ca..1031f1106 100644--- a/web/css/wv.layers.modal.css+++ b/web/css/wv.layers.modal.css@@ -1,8 +1,73 @@+/*jqueryUI overrides*/+.layer-modal .ui-widget-header,+.layer-modal .ui-dialog-titlebar,+.layer-modal .ui-widget-content,+.layer-modal .ui-dialog-content{+ background:none;+ border:0;+}+.layer-modal, .layer-modal.ui-dialog{+ background:rgb(220,220,220);+}+.layer-modal div, .layer-modal span{+ font-family:open_sans_light;+ font-weight:300;+ color:#383838;+}+++.layer-modal .ui-dialog-titlebar{+ height:40px;+ padding:5px 5px 5px 10px;+ line-height:40px;+}+.layer-modal .ui-dialog-title{+ width:auto;+ font-weight:300;+ font-size:32px;+ line-height:40px;+ margin:0;+}+.layer-modal .ui-dialog-titlebar-close{+ position:relative;+ top:0;+ margin:0;+ width:40px;+ height:40px;+ float:right;+}+.layer-modal .ui-dialog-titlebar-close .ui-icon-closethick{+ width:32px;+ height:32px;+ margin:-16px 0 0 -16px;+ top:50%;+ left:50%;+ background:url('../images/wv-icons.png') 32px 32px;+}+++/* Tile layout */+.product-modal{+ position:relative;+}.grid-item {- background-color:#fff;- width: 25%;+ background-color:#000;+ width: 150px;+ height: 70px;}.grid-item--width2 {- background-color:#880;- width: 50%;+ background-color:#666;+ width: 310px;+}+.grid-item--width3{+ background-color:blue;+ width: 470px;+}+.grid-item--height2{+ background-color:red;+ height: 150px;+}+.grid-item--height3{+ background-color:green;+ height:230px;}\ No newline at end of filediff --git a/web/css/wv.main.css b/web/css/wv.main.cssindex 28b0f37ff..1dcbc5b8a 100644--- a/web/css/wv.main.css+++ b/web/css/wv.main.css@@ -8,8 +8,16 @@* Administrator of the National Aeronautics and Space Administration.* All Rights Reserved.*/--html,body, div, ul, li, p, h1, h2, h3, h4, h5, h6 {display:block; margin:0; padding:0; font: 100 13px/13px "Lucida Sans", "Arial", Sans-Serif;}+@font-face {+ font-family: open_sans_light;+ src: local(open_sans_light), url('../font/OpenSans-Light.ttf') format('opentype');+}+html,body, div, ul, li, p, h1, h2, h3, h4, h5, h6 {+ display:block;+ margin:0;+ padding:0;+ font: 100 13px/13px "Lucida Sans", "Arial", Sans-Serif;+}html, body {width: 100%;@@ -39,11 +47,22 @@ h1, h2, h3, h4, h5, h6 { font-weight:400; }#info_drop div.hidden a {display:block; color:#fff; font-weight:100; line-height:1em; font-size: 11px; width:70px; padding: 2px 5px; text-align:right; text-decoration:none;}#info_drop div.hidden a:hover {background: rgba(38,43,49,0.45); }#info_drop:hover div.hidden {display:block; background: rgba(38,43,49,0.45); width:80px; margin-left:-40px; margin-top:2px;}-#info {display:block; width:40px; height:40px; border:none;}---div.horizontalContainer {width:100%; display:block; float:left; position:absolute; bottom:10px; overflow:hidden; z-index:200; padding: 0;}-+#info {+ display:block;+ width:40px;+ height:40px;+ border:none;+}+div.horizontalContainer {+ width:100%;+ display:block;+ float:left;+ position:absolute;+ bottom:10px;+ overflow:hidden;+ z-index:200;+ padding: 0;+}#permalink_content {margin-top:10px;}.hidden {display:none;}@@ -299,7 +318,10 @@ label {border-bottom-left-radius: 0;border-bottom-right-radius: 0;}-+.ui-widget-overlay{+ background:#000;+ opacity:0.7;+}.ui-widget-header {background: rgb(40, 40, 40);}diff --git a/web/css/wv.sidebar.css b/web/css/wv.sidebar.cssindex 79a3c4c8f..42f0aaf8a 100644--- a/web/css/wv.sidebar.css+++ b/web/css/wv.sidebar.css@@ -53,3 +53,6 @@#productsHolder footer .action.ui-state-hover {color: #333;}+#productsHolder footer .action.ui-state-focus {+ background: #666;+}diff --git a/web/ext/layers/isotope/packery-mode.pkgd.js b/web/ext/layers/isotope/packery-mode.pkgd.jsnew file mode 100755index 000000000..dcc88f8ab--- /dev/null+++ b/web/ext/layers/isotope/packery-mode.pkgd.js@@ -0,0 +1,1200 @@+/*!+ * Packery layout mode PACKAGED v1.1.3+ * sub-classes Packery+ * http://packery.metafizzy.co+ */++/*!+ * classie v1.0.1+ * class helper functions+ * from bonzo https://github.com/ded/bonzo+ * MIT license+ *+ * classie.has( elem, 'my-class' ) -> true/false+ * classie.add( elem, 'my-new-class' )+ * classie.remove( elem, 'my-unwanted-class' )+ * classie.toggle( elem, 'my-class' )+ */++/*jshint browser: true, strict: true, undef: true, unused: true */+/*global define: false, module: false */++( function( window ) {++++// class helper functions from bonzo https://github.com/ded/bonzo++function classReg( className ) {+ return new RegExp("(^|\\s+)" + className + "(\\s+|$)");+}++// classList support for class management+// altho to be fair, the api sucks because it won't accept multiple classes at once+var hasClass, addClass, removeClass;++if ( 'classList' in document.documentElement ) {+ hasClass = function( elem, c ) {+ return elem.classList.contains( c );+ };+ addClass = function( elem, c ) {+ elem.classList.add( c );+ };+ removeClass = function( elem, c ) {+ elem.classList.remove( c );+ };+}+else {+ hasClass = function( elem, c ) {+ return classReg( c ).test( elem.className );+ };+ addClass = function( elem, c ) {+ if ( !hasClass( elem, c ) ) {+ elem.className = elem.className + ' ' + c;+ }+ };+ removeClass = function( elem, c ) {+ elem.className = elem.className.replace( classReg( c ), ' ' );+ };+}++function toggleClass( elem, c ) {+ var fn = hasClass( elem, c ) ? removeClass : addClass;+ fn( elem, c );+}++var classie = {+ // full names+ hasClass: hasClass,+ addClass: addClass,+ removeClass: removeClass,+ toggleClass: toggleClass,+ // short names+ has: hasClass,+ add: addClass,+ remove: removeClass,+ toggle: toggleClass+};++// transport+if ( typeof define === 'function' && define.amd ) {+ // AMD+ define( 'classie/classie',classie );+} else if ( typeof exports === 'object' ) {+ // CommonJS+ module.exports = classie;+} else {+ // browser global+ window.classie = classie;+}++})( window );++/**+ * Rect+ * low-level utility class for basic geometry+ */++( function( window, factory ) {++ // universal module definition+ if ( typeof define == 'function' && define.amd ) {+ // AMD+ define( 'packery/js/rect',factory );+ } else if ( typeof exports == 'object' ) {+ // CommonJS+ module.exports = factory();+ } else {+ // browser global+ window.Packery = window.Packery || {};+ window.Packery.Rect = factory();+ }++}( window, function factory() {+++// -------------------------- Packery -------------------------- //++// global namespace+var Packery = window.Packery = function() {};++// -------------------------- Rect -------------------------- //++function Rect( props ) {+ // extend properties from defaults+ for ( var prop in Rect.defaults ) {+ this[ prop ] = Rect.defaults[ prop ];+ }++ for ( prop in props ) {+ this[ prop ] = props[ prop ];+ }++}++// make available+Packery.Rect = Rect;++Rect.defaults = {+ x: 0,+ y: 0,+ width: 0,+ height: 0+};++/**+ * Determines whether or not this rectangle wholly encloses another rectangle or point.+ * @param {Rect} rect+ * @returns {Boolean}+**/+Rect.prototype.contains = function( rect ) {+ // points don't have width or height+ var otherWidth = rect.width || 0;+ var otherHeight = rect.height || 0;+ return this.x <= rect.x &&+ this.y <= rect.y &&+ this.x + this.width >= rect.x + otherWidth &&+ this.y + this.height >= rect.y + otherHeight;+};++/**+ * Determines whether or not the rectangle intersects with another.+ * @param {Rect} rect+ * @returns {Boolean}+**/+Rect.prototype.overlaps = function( rect ) {+ var thisRight = this.x + this.width;+ var thisBottom = this.y + this.height;+ var rectRight = rect.x + rect.width;+ var rectBottom = rect.y + rect.height;++ // http://stackoverflow.com/a/306332+ return this.x < rectRight &&+ thisRight > rect.x &&+ this.y < rectBottom &&+ thisBottom > rect.y;+};++/**+ * @param {Rect} rect - the overlapping rect+ * @returns {Array} freeRects - rects representing the area around the rect+**/+Rect.prototype.getMaximalFreeRects = function( rect ) {++ // if no intersection, return false+ if ( !this.overlaps( rect ) ) {+ return false;+ }++ var freeRects = [];+ var freeRect;++ var thisRight = this.x + this.width;+ var thisBottom = this.y + this.height;+ var rectRight = rect.x + rect.width;+ var rectBottom = rect.y + rect.height;++ // top+ if ( this.y < rect.y ) {+ freeRect = new Rect({+ x: this.x,+ y: this.y,+ width: this.width,+ height: rect.y - this.y+ });+ freeRects.push( freeRect );+ }++ // right+ if ( thisRight > rectRight ) {+ freeRect = new Rect({+ x: rectRight,+ y: this.y,+ width: thisRight - rectRight,+ height: this.height+ });+ freeRects.push( freeRect );+ }++ // bottom+ if ( thisBottom > rectBottom ) {+ freeRect = new Rect({+ x: this.x,+ y: rectBottom,+ width: this.width,+ height: thisBottom - rectBottom+ });+ freeRects.push( freeRect );+ }++ // left+ if ( this.x < rect.x ) {+ freeRect = new Rect({+ x: this.x,+ y: this.y,+ width: rect.x - this.x,+ height: this.height+ });+ freeRects.push( freeRect );+ }++ return freeRects;+};++Rect.prototype.canFit = function( rect ) {+ return this.width >= rect.width && this.height >= rect.height;+};++return Rect;++}));++/**+ * Packer+ * bin-packing algorithm+ */++( function( window, factory ) {++ // universal module definition+ if ( typeof define == 'function' && define.amd ) {+ // AMD+ define( 'packery/js/packer',[ './rect' ], factory );+ } else if ( typeof exports == 'object' ) {+ // CommonJS+ module.exports = factory(+ require('./rect')+ );+ } else {+ // browser global+ var Packery = window.Packery = window.Packery || {};+ Packery.Packer = factory( Packery.Rect );+ }++}( window, function factory( Rect ) {+++// -------------------------- Packer -------------------------- //++/**+ * @param {Number} width+ * @param {Number} height+ * @param {String} sortDirection+ * topLeft for vertical, leftTop for horizontal+ */+function Packer( width, height, sortDirection ) {+ this.width = width || 0;+ this.height = height || 0;+ this.sortDirection = sortDirection || 'downwardLeftToRight';++ this.reset();+}++Packer.prototype.reset = function() {+ this.spaces = [];+ this.newSpaces = [];++ var initialSpace = new Rect({+ x: 0,+ y: 0,+ width: this.width,+ height: this.height+ });++ this.spaces.push( initialSpace );+ // set sorter+ this.sorter = sorters[ this.sortDirection ] || sorters.downwardLeftToRight;+};++// change x and y of rect to fit with in Packer's available spaces+Packer.prototype.pack = function( rect ) {+ for ( var i=0, len = this.spaces.length; i < len; i++ ) {+ var space = this.spaces[i];+ if ( space.canFit( rect ) ) {+ this.placeInSpace( rect, space );+ break;+ }+ }+};++Packer.prototype.placeInSpace = function( rect, space ) {+ // place rect in space+ rect.x = space.x;+ rect.y = space.y;++ this.placed( rect );+};++// update spaces with placed rect+Packer.prototype.placed = function( rect ) {+ // update spaces+ var revisedSpaces = [];+ for ( var i=0, len = this.spaces.length; i < len; i++ ) {+ var space = this.spaces[i];+ var newSpaces = space.getMaximalFreeRects( rect );+ // add either the original space or the new spaces to the revised spaces+ if ( newSpaces ) {+ revisedSpaces.push.apply( revisedSpaces, newSpaces );+ } else {+ revisedSpaces.push( space );+ }+ }++ this.spaces = revisedSpaces;++ this.mergeSortSpaces();+};++Packer.prototype.mergeSortSpaces = function() {+ // remove redundant spaces+ Packer.mergeRects( this.spaces );+ this.spaces.sort( this.sorter );+};++// add a space back+Packer.prototype.addSpace = function( rect ) {+ this.spaces.push( rect );+ this.mergeSortSpaces();+};++// -------------------------- utility functions -------------------------- //++/**+ * Remove redundant rectangle from array of rectangles+ * @param {Array} rects: an array of Rects+ * @returns {Array} rects: an array of Rects+**/+Packer.mergeRects = function( rects ) {+ for ( var i=0, len = rects.length; i < len; i++ ) {+ var rect = rects[i];+ // skip over this rect if it was already removed+ if ( !rect ) {+ continue;+ }+ // clone rects we're testing, remove this rect+ var compareRects = rects.slice(0);+ // do not compare with self+ compareRects.splice( i, 1 );+ // compare this rect with others+ var removedCount = 0;+ for ( var j=0, jLen = compareRects.length; j < jLen; j++ ) {+ var compareRect = compareRects[j];+ // if this rect contains another,+ // remove that rect from test collection+ var indexAdjust = i > j ? 0 : 1;+ if ( rect.contains( compareRect ) ) {+ // console.log( 'current test rects:' + testRects.length, testRects );+ // console.log( i, j, indexAdjust, rect, compareRect );+ rects.splice( j + indexAdjust - removedCount, 1 );+ removedCount++;+ }+ }+ }++ return rects;+};+++// -------------------------- sorters -------------------------- //++// functions for sorting rects in order+var sorters = {+ // top down, then left to right+ downwardLeftToRight: function( a, b ) {+ return a.y - b.y || a.x - b.x;+ },+ // left to right, then top down+ rightwardTopToBottom: function( a, b ) {+ return a.x - b.x || a.y - b.y;+ }+};+++// -------------------------- -------------------------- //++return Packer;++}));+/**+ * Packery Item Element+**/++( function( window, factory ) {++ // universal module definition++ if ( typeof define == 'function' && define.amd ) {+ // AMD+ define( 'packery/js/item',[+ 'get-style-property/get-style-property',+ 'outlayer/outlayer',+ './rect'+ ],+ factory );+ } else if ( typeof exports == 'object' ) {+ // CommonJS+ module.exports = factory(+ require('desandro-get-style-property'),+ require('outlayer'),+ require('./rect')+ );+ } else {+ // browser global+ window.Packery.Item = factory(+ window.getStyleProperty,+ window.Outlayer,+ window.Packery.Rect+ );+ }++}( window, function factory( getStyleProperty, Outlayer, Rect ) {+++// -------------------------- Item -------------------------- //++var transformProperty = getStyleProperty('transform');++// sub-class Item+var Item = function PackeryItem() {+ Outlayer.Item.apply( this, arguments );+};++Item.prototype = new Outlayer.Item();++var protoCreate = Item.prototype._create;+Item.prototype._create = function() {+ // call default _create logic+ protoCreate.call( this );+ this.rect = new Rect();+ // rect used for placing, in drag or Packery.fit()+ this.placeRect = new Rect();+};++// -------------------------- drag -------------------------- //++Item.prototype.dragStart = function() {+ this.getPosition();+ this.removeTransitionStyles();+ // remove transform property from transition+ if ( this.isTransitioning && transformProperty ) {+ this.element.style[ transformProperty ] = 'none';+ }+ this.getSize();+ // create place rect, used for position when dragged then dropped+ // or when positioning+ this.isPlacing = true;+ this.needsPositioning = false;+ this.positionPlaceRect( this.position.x, this.position.y );+ this.isTransitioning = false;+ this.didDrag = false;+};++/**+ * handle item when it is dragged+ * @param {Number} x - horizontal position of dragged item+ * @param {Number} y - vertical position of dragged item+ */+Item.prototype.dragMove = function( x, y ) {+ this.didDrag = true;+ var packerySize = this.layout.size;+ x -= packerySize.paddingLeft;+ y -= packerySize.paddingTop;+ this.positionPlaceRect( x, y );+};++Item.prototype.dragStop = function() {+ this.getPosition();+ var isDiffX = this.position.x != this.placeRect.x;+ var isDiffY = this.position.y != this.placeRect.y;+ // set post-drag positioning flag+ this.needsPositioning = isDiffX || isDiffY;+ // reset flag+ this.didDrag = false;+};++// -------------------------- placing -------------------------- //++/**+ * position a rect that will occupy space in the packer+ * @param {Number} x+ * @param {Number} y+ * @param {Boolean} isMaxYContained+ */+Item.prototype.positionPlaceRect = function( x, y, isMaxYOpen ) {+ this.placeRect.x = this.getPlaceRectCoord( x, true );+ this.placeRect.y = this.getPlaceRectCoord( y, false, isMaxYOpen );+};++/**+ * get x/y coordinate for place rect+ * @param {Number} coord - x or y+ * @param {Boolean} isX+ * @param {Boolean} isMaxOpen - does not limit value to outer bound+ * @returns {Number} coord - processed x or y+ */+Item.prototype.getPlaceRectCoord = function( coord, isX, isMaxOpen ) {+ var measure = isX ? 'Width' : 'Height';+ var size = this.size[ 'outer' + measure ];+ var segment = this.layout[ isX ? 'columnWidth' : 'rowHeight' ];+ var parentSize = this.layout.size[ 'inner' + measure ];++ // additional parentSize calculations for Y+ if ( !isX ) {+ parentSize = Math.max( parentSize, this.layout.maxY );+ // prevent gutter from bumping up height when non-vertical grid+ if ( !this.layout.rowHeight ) {+ parentSize -= this.layout.gutter;+ }+ }++ var max;++ if ( segment ) {+ segment += this.layout.gutter;+ // allow for last column to reach the edge+ parentSize += isX ? this.layout.gutter : 0;+ // snap to closest segment+ coord = Math.round( coord / segment );+ // contain to outer bound+ // contain non-growing bound, allow growing bound to grow+ var mathMethod;+ if ( this.layout.options.isHorizontal ) {+ mathMethod = !isX ? 'floor' : 'ceil';+ } else {+ mathMethod = isX ? 'floor' : 'ceil';+ }+ var maxSegments = Math[ mathMethod ]( parentSize / segment );+ maxSegments -= Math.ceil( size / segment );+ max = maxSegments;+ } else {+ max = parentSize - size;+ }++ coord = isMaxOpen ? coord : Math.min( coord, max );+ coord *= segment || 1;++ return Math.max( 0, coord );+};++Item.prototype.copyPlaceRectPosition = function() {+ this.rect.x = this.placeRect.x;+ this.rect.y = this.placeRect.y;+};++// ----- ----- //++// remove element from DOM+Item.prototype.removeElem = function() {+ this.element.parentNode.removeChild( this.element );+ // add space back to packer+ this.layout.packer.addSpace( this.rect );+ this.emitEvent( 'remove', [ this ] );+};++// ----- ----- //++return Item;++}));++/*!+ * Packery v1.4.1+ * bin-packing layout library+ *+ * Licensed GPLv3 for open source use+ * or Flickity Commercial License for commercial use+ *+ * http://packery.metafizzy.co+ * Copyright 2015 Metafizzy+ */++( function( window, factory ) {++ // universal module definition+ if ( typeof define == 'function' && define.amd ) {+ // AMD+ define( 'packery/js/packery',[+ 'classie/classie',+ 'get-size/get-size',+ 'outlayer/outlayer',+ './rect',+ './packer',+ './item'+ ],+ factory );+ } else if ( typeof exports == 'object' ) {+ // CommonJS+ module.exports = factory(+ require('desandro-classie'),+ require('get-size'),+ require('outlayer'),+ require('./rect'),+ require('./packer'),+ require('./item')+ );+ } else {+ // browser global+ window.Packery = factory(+ window.classie,+ window.getSize,+ window.Outlayer,+ window.Packery.Rect,+ window.Packery.Packer,+ window.Packery.Item+ );+ }++}( window, function factory( classie, getSize, Outlayer, Rect, Packer, Item ) {+++// ----- Rect ----- //++// allow for pixel rounding errors IE8-IE11 & Firefox; #227+Rect.prototype.canFit = function( rect ) {+ return this.width >= rect.width - 1 && this.height >= rect.height - 1;+};++// -------------------------- Packery -------------------------- //++// create an Outlayer layout class+var Packery = Outlayer.create('packery');+Packery.Item = Item;++Packery.prototype._create = function() {+ // call super+ Outlayer.prototype._create.call( this );++ // initial properties+ this.packer = new Packer();++ // Left over from v1.0+ this.stamp( this.options.stamped );++ // create drag handlers+ var _this = this;+ this.handleDraggabilly = {+ dragStart: function() {+ _this.itemDragStart( this.element );+ },+ dragMove: function() {+ _this.itemDragMove( this.element, this.position.x, this.position.y );+ },+ dragEnd: function() {+ _this.itemDragEnd( this.element );+ }+ };++ this.handleUIDraggable = {+ start: function handleUIDraggableStart( event ) {+ _this.itemDragStart( event.currentTarget );+ },+ drag: function handleUIDraggableDrag( event, ui ) {+ _this.itemDragMove( event.currentTarget, ui.position.left, ui.position.top );+ },+ stop: function handleUIDraggableStop( event ) {+ _this.itemDragEnd( event.currentTarget );+ }+ };++};+++// ----- init & layout ----- //++/**+ * logic before any new layout+ */+Packery.prototype._resetLayout = function() {+ this.getSize();++ this._getMeasurements();++ // reset packer+ var packer = this.packer;+ // packer settings, if horizontal or vertical+ if ( this.options.isHorizontal ) {+ packer.width = Number.POSITIVE_INFINITY;+ packer.height = this.size.innerHeight + this.gutter;+ packer.sortDirection = 'rightwardTopToBottom';+ } else {+ packer.width = this.size.innerWidth + this.gutter;+ packer.height = Number.POSITIVE_INFINITY;+ packer.sortDirection = 'downwardLeftToRight';+ }++ packer.reset();++ // layout+ this.maxY = 0;+ this.maxX = 0;+};++/**+ * update columnWidth, rowHeight, & gutter+ * @private+ */+Packery.prototype._getMeasurements = function() {+ this._getMeasurement( 'columnWidth', 'width' );+ this._getMeasurement( 'rowHeight', 'height' );+ this._getMeasurement( 'gutter', 'width' );+};++Packery.prototype._getItemLayoutPosition = function( item ) {+ this._packItem( item );+ return item.rect;+};+++/**+ * layout item in packer+ * @param {Packery.Item} item+ */+Packery.prototype._packItem = function( item ) {+ this._setRectSize( item.element, item.rect );+ // pack the rect in the packer+ this.packer.pack( item.rect );+ this._setMaxXY( item.rect );+};++/**+ * set max X and Y value, for size of container+ * @param {Packery.Rect} rect+ * @private+ */+Packery.prototype._setMaxXY = function( rect ) {+ this.maxX = Math.max( rect.x + rect.width, this.maxX );+ this.maxY = Math.max( rect.y + rect.height, this.maxY );+};++/**+ * set the width and height of a rect, applying columnWidth and rowHeight+ * @param {Element} elem+ * @param {Packery.Rect} rect+ */+Packery.prototype._setRectSize = function( elem, rect ) {+ var size = getSize( elem );+ var w = size.outerWidth;+ var h = size.outerHeight;+ // size for columnWidth and rowHeight, if available+ // only check if size is non-zero, #177+ if ( w || h ) {+ w = this._applyGridGutter( w, this.columnWidth );+ h = this._applyGridGutter( h, this.rowHeight );+ }+ // rect must fit in packer+ rect.width = Math.min( w, this.packer.width );+ rect.height = Math.min( h, this.packer.height );+};++/**+ * fits item to columnWidth/rowHeight and adds gutter+ * @param {Number} measurement - item width or height+ * @param {Number} gridSize - columnWidth or rowHeight+ * @returns measurement+ */+Packery.prototype._applyGridGutter = function( measurement, gridSize ) {+ // just add gutter if no gridSize+ if ( !gridSize ) {+ return measurement + this.gutter;+ }+ gridSize += this.gutter;+ // fit item to columnWidth/rowHeight+ var remainder = measurement % gridSize;+ var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';+ measurement = Math[ mathMethod ]( measurement / gridSize ) * gridSize;+ return measurement;+};++Packery.prototype._getContainerSize = function() {+ if ( this.options.isHorizontal ) {+ return {+ width: this.maxX - this.gutter+ };+ } else {+ return {+ height: this.maxY - this.gutter+ };+ }+};+++// -------------------------- stamp -------------------------- //++/**+ * makes space for element+ * @param {Element} elem+ */+Packery.prototype._manageStamp = function( elem ) {++ var item = this.getItem( elem );+ var rect;+ if ( item && item.isPlacing ) {+ rect = item.placeRect;+ } else {+ var offset = this._getElementOffset( elem );+ rect = new Rect({+ x: this.options.isOriginLeft ? offset.left : offset.right,+ y: this.options.isOriginTop ? offset.top : offset.bottom+ });+ }++ this._setRectSize( elem, rect );+ // save its space in the packer+ this.packer.placed( rect );+ this._setMaxXY( rect );+};++// -------------------------- methods -------------------------- //++function verticalSorter( a, b ) {+ return a.position.y - b.position.y || a.position.x - b.position.x;+}++function horizontalSorter( a, b ) {+ return a.position.x - b.position.x || a.position.y - b.position.y;+}++Packery.prototype.sortItemsByPosition = function() {+ var sorter = this.options.isHorizontal ? horizontalSorter : verticalSorter;+ this.items.sort( sorter );+};++/**+ * Fit item element in its current position+ * Packery will position elements around it+ * useful for expanding elements+ *+ * @param {Element} elem+ * @param {Number} x - horizontal destination position, optional+ * @param {Number} y - vertical destination position, optional+ */+Packery.prototype.fit = function( elem, x, y ) {+ var item = this.getItem( elem );+ if ( !item ) {+ return;+ }++ // prepare internal properties+ this._getMeasurements();++ // stamp item to get it out of layout+ this.stamp( item.element );+ // required for positionPlaceRect+ item.getSize();+ // set placing flag+ item.isPlacing = true;+ // fall back to current position for fitting+ x = x === undefined ? item.rect.x: x;+ y = y === undefined ? item.rect.y: y;++ // position it best at its destination+ item.positionPlaceRect( x, y, true );++ this._bindFitEvents( item );+ item.moveTo( item.placeRect.x, item.placeRect.y );+ // layout everything else+ this.layout();++ // return back to regularly scheduled programming+ this.unstamp( item.element );+ this.sortItemsByPosition();+ // un set placing flag, back to normal+ item.isPlacing = false;+ // copy place rect position+ item.copyPlaceRectPosition();+};++/**+ * emit event when item is fit and other items are laid out+ * @param {Packery.Item} item+ * @private+ */+Packery.prototype._bindFitEvents = function( item ) {+ var _this = this;+ var ticks = 0;+ function tick() {+ ticks++;+ if ( ticks != 2 ) {+ return;+ }+ _this.emitEvent( 'fitComplete', [ item ] );+ }+ // when item is laid out+ item.on( 'layout', function() {+ tick();+ return true;+ });+ // when all items are laid out+ this.on( 'layoutComplete', function() {+ tick();+ return true;+ });+};++// -------------------------- resize -------------------------- //++// debounced, layout on resize+Packery.prototype.resize = function() {+ // don't trigger if size did not change+ var size = getSize( this.element );+ // check that this.size and size are there+ // IE8 triggers resize on body size change, so they might not be+ var hasSizes = this.size && size;+ var innerSize = this.options.isHorizontal ? 'innerHeight' : 'innerWidth';+ if ( hasSizes && size[ innerSize ] == this.size[ innerSize ] ) {+ return;+ }++ this.layout();+};++// -------------------------- drag -------------------------- //++/**+ * handle an item drag start event+ * @param {Element} elem+ */+Packery.prototype.itemDragStart = function( elem ) {+ this.stamp( elem );+ var item = this.getItem( elem );+ if ( item ) {+ item.dragStart();+ }+};++/**+ * handle an item drag move event+ * @param {Element} elem+ * @param {Number} x - horizontal change in position+ * @param {Number} y - vertical change in position+ */+Packery.prototype.itemDragMove = function( elem, x, y ) {+ var item = this.getItem( elem );+ if ( item ) {+ item.dragMove( x, y );+ }++ // debounce+ var _this = this;+ // debounce triggering layout+ function delayed() {+ _this.layout();+ delete _this.dragTimeout;+ }++ this.clearDragTimeout();++ this.dragTimeout = setTimeout( delayed, 40 );+};++Packery.prototype.clearDragTimeout = function() {+ if ( this.dragTimeout ) {+ clearTimeout( this.dragTimeout );+ }+};++/**+ * handle an item drag end event+ * @param {Element} elem+ */+Packery.prototype.itemDragEnd = function( elem ) {+ var item = this.getItem( elem );+ var itemDidDrag;+ if ( item ) {+ itemDidDrag = item.didDrag;+ item.dragStop();+ }+ // if elem didn't move, or if it doesn't need positioning+ // unignore and unstamp and call it a day+ if ( !item || ( !itemDidDrag && !item.needsPositioning ) ) {+ this.unstamp( elem );+ return;+ }+ // procced with dragged item++ classie.add( item.element, 'is-positioning-post-drag' );++ // save this var, as it could get reset in dragStart+ var onLayoutComplete = this._getDragEndLayoutComplete( elem, item );++ if ( item.needsPositioning ) {+ item.on( 'layout', onLayoutComplete );+ item.moveTo( item.placeRect.x, item.placeRect.y );+ } else if ( item ) {+ // item didn't need placement+ item.copyPlaceRectPosition();+ }++ this.clearDragTimeout();+ this.on( 'layoutComplete', onLayoutComplete );+ this.layout();++};++/**+ * get drag end callback+ * @param {Element} elem+ * @param {Packery.Item} item+ * @returns {Function} onLayoutComplete+ */+Packery.prototype._getDragEndLayoutComplete = function( elem, item ) {+ var itemNeedsPositioning = item && item.needsPositioning;+ var completeCount = 0;+ var asyncCount = itemNeedsPositioning ? 2 : 1;+ var _this = this;++ return function onLayoutComplete() {+ completeCount++;+ // don't proceed if not complete+ if ( completeCount != asyncCount ) {+ return true;+ }+ // reset item+ if ( item ) {+ classie.remove( item.element, 'is-positioning-post-drag' );+ item.isPlacing = false;+ item.copyPlaceRectPosition();+ }++ _this.unstamp( elem );+ // only sort when item moved+ _this.sortItemsByPosition();++ // emit item drag event now that everything is done+ if ( itemNeedsPositioning ) {+ _this.emitEvent( 'dragItemPositioned', [ item ] );+ }+ // listen once+ return true;+ };+};++/**+ * binds Draggabilly events+ * @param {Draggabilly} draggie+ */+Packery.prototype.bindDraggabillyEvents = function( draggie ) {+ draggie.on( 'dragStart', this.handleDraggabilly.dragStart );+ draggie.on( 'dragMove', this.handleDraggabilly.dragMove );+ draggie.on( 'dragEnd', this.handleDraggabilly.dragEnd );+};++/**+ * binds jQuery UI Draggable events+ * @param {jQuery} $elems+ */+Packery.prototype.bindUIDraggableEvents = function( $elems ) {+ $elems+ .on( 'dragstart', this.handleUIDraggable.start )+ .on( 'drag', this.handleUIDraggable.drag )+ .on( 'dragstop', this.handleUIDraggable.stop );+};++Packery.Rect = Rect;+Packery.Packer = Packer;++return Packery;++}));++/*!+ * Packery layout mode v1.1.3+ * sub-classes Packery+ * http://packery.metafizzy.co+ */++/*jshint browser: true, strict: true, undef: true, unused: true */++( function( window, factory ) {++ // universal module definition+ if ( typeof define == 'function' && define.amd ) {+ // AMD+ define( [+ 'isotope/js/layout-mode',+ 'packery/js/packery',+ 'get-size/get-size'+ ],+ factory );+ } else if ( typeof exports == 'object' ) {+ // CommonJS+ module.exports = factory(+ require('isotope-layout/js/layout-mode'),+ require('packery'),+ require('get-size')+ );+ } else {+ // browser global+ factory(+ window.Isotope.LayoutMode,+ window.Packery,+ window.getSize+ );+ }++}( window, function factor( LayoutMode, Packery, getSize ) {+++// -------------------------- helpers -------------------------- //++// extend objects+function extend( a, b ) {+ for ( var prop in b ) {+ a[ prop ] = b[ prop ];+ }+ return a;+}++// -------------------------- masonryDefinition -------------------------- //++ // create an Outlayer layout class+ var PackeryMode = LayoutMode.create('packery');++ // save on to these methods+ var _getElementOffset = PackeryMode.prototype._getElementOffset;+ // var layout = PackeryMode.prototype.layout;+ var _getMeasurement = PackeryMode.prototype._getMeasurement;++ // sub-class Masonry+ extend( PackeryMode.prototype, Packery.prototype );++ // set back, as it was overwritten by Packery+ PackeryMode.prototype._getElementOffset = _getElementOffset;+ // PackeryMode.prototype.layout = layout;+ PackeryMode.prototype._getMeasurement = _getMeasurement;++ // set packery in _resetLayout+ var _resetLayout = PackeryMode.prototype._resetLayout;+ PackeryMode.prototype._resetLayout = function() {+ this.packer = this.packer || new Packery.Packer();+ _resetLayout.apply( this, arguments );+ };++ var _getItemLayoutPosition = PackeryMode.prototype._getItemLayoutPosition;+ PackeryMode.prototype._getItemLayoutPosition = function( item ) {+ // set packery rect+ item.rect = item.rect || new Packery.Rect();+ return _getItemLayoutPosition.call( this, item );+ };++ // HACK copy over isOriginLeft/Top options+ var _manageStamp = PackeryMode.prototype._manageStamp;+ PackeryMode.prototype._manageStamp = function() {+ this.options.isOriginLeft = this.isotope.options.isOriginLeft;+ this.options.isOriginTop = this.isotope.options.isOriginTop;+ _manageStamp.apply( this, arguments );+ };++ PackeryMode.prototype.needsResizeLayout = function() {+ // don't trigger if size did not change+ var size = getSize( this.element );+ // check that this.size and size are there+ // IE8 triggers resize on body size change, so they might not be+ var hasSizes = this.size && size;+ var innerSize = this.options.isHorizontal ? 'innerHeight' : 'innerWidth';+ return hasSizes && size[ innerSize ] != this.size[ innerSize ];+ };++ return PackeryMode;+}));+diff --git a/web/ext/layers/isotope/packery-mode.pkgd.min.js b/web/ext/layers/isotope/packery-mode.pkgd.min.jsnew file mode 100755index 000000000..19d20784d--- /dev/null+++ b/web/ext/layers/isotope/packery-mode.pkgd.min.js@@ -0,0 +1,7 @@+/*!+ * Packery layout mode PACKAGED v1.1.3+ * sub-classes Packery+ * http://packery.metafizzy.co+ */++!function(a){function b(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function c(a,b){var c=d(a,b)?f:e;c(a,b)}var d,e,f;"classList"in document.documentElement?(d=function(a,b){return a.classList.contains(b)},e=function(a,b){a.classList.add(b)},f=function(a,b){a.classList.remove(b)}):(d=function(a,c){return b(c).test(a.className)},e=function(a,b){d(a,b)||(a.className=a.className+" "+b)},f=function(a,c){a.className=a.className.replace(b(c)," ")});var g={hasClass:d,addClass:e,removeClass:f,toggleClass:c,has:d,add:e,remove:f,toggle:c};"function"==typeof define&&define.amd?define("classie/classie",g):"object"==typeof exports?module.exports=g:a.classie=g}(window),function(a,b){"function"==typeof define&&define.amd?define("packery/js/rect",b):"object"==typeof exports?module.exports=b():(a.Packery=a.Packery||{},a.Packery.Rect=b())}(window,function(){function a(b){for(var c in a.defaults)this[c]=a.defaults[c];for(c in b)this[c]=b[c]}var b=window.Packery=function(){};return b.Rect=a,a.defaults={x:0,y:0,width:0,height:0},a.prototype.contains=function(a){var b=a.width||0,c=a.height||0;return this.x<=a.x&&this.y<=a.y&&this.x+this.width>=a.x+b&&this.y+this.height>=a.y+c},a.prototype.overlaps=function(a){var b=this.x+this.width,c=this.y+this.height,d=a.x+a.width,e=a.y+a.height;return this.x<d&&b>a.x&&this.y<e&&c>a.y},a.prototype.getMaximalFreeRects=function(b){if(!this.overlaps(b))return!1;var c,d=[],e=this.x+this.width,f=this.y+this.height,g=b.x+b.width,h=b.y+b.height;return this.y<b.y&&(c=new a({x:this.x,y:this.y,width:this.width,height:b.y-this.y}),d.push(c)),e>g&&(c=new a({x:g,y:this.y,width:e-g,height:this.height}),d.push(c)),f>h&&(c=new a({x:this.x,y:h,width:this.width,height:f-h}),d.push(c)),this.x<b.x&&(c=new a({x:this.x,y:this.y,width:b.x-this.x,height:this.height}),d.push(c)),d},a.prototype.canFit=function(a){return this.width>=a.width&&this.height>=a.height},a}),function(a,b){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],b);else if("object"==typeof exports)module.exports=b(require("./rect"));else{var c=a.Packery=a.Packery||{};c.Packer=b(c.Rect)}}(window,function(a){function b(a,b,c){this.width=a||0,this.height=b||0,this.sortDirection=c||"downwardLeftToRight",this.reset()}b.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var b=new a({x:0,y:0,width:this.width,height:this.height});this.spaces.push(b),this.sorter=c[this.sortDirection]||c.downwardLeftToRight},b.prototype.pack=function(a){for(var b=0,c=this.spaces.length;c>b;b++){var d=this.spaces[b];if(d.canFit(a)){this.placeInSpace(a,d);break}}},b.prototype.placeInSpace=function(a,b){a.x=b.x,a.y=b.y,this.placed(a)},b.prototype.placed=function(a){for(var b=[],c=0,d=this.spaces.length;d>c;c++){var e=this.spaces[c],f=e.getMaximalFreeRects(a);f?b.push.apply(b,f):b.push(e)}this.spaces=b,this.mergeSortSpaces()},b.prototype.mergeSortSpaces=function(){b.mergeRects(this.spaces),this.spaces.sort(this.sorter)},b.prototype.addSpace=function(a){this.spaces.push(a),this.mergeSortSpaces()},b.mergeRects=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];if(d){var e=a.slice(0);e.splice(b,1);for(var f=0,g=0,h=e.length;h>g;g++){var i=e[g],j=b>g?0:1;d.contains(i)&&(a.splice(g+j-f,1),f++)}}}return a};var c={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return b}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/item",["get-style-property/get-style-property","outlayer/outlayer","./rect"],b):"object"==typeof exports?module.exports=b(require("desandro-get-style-property"),require("outlayer"),require("./rect")):a.Packery.Item=b(a.getStyleProperty,a.Outlayer,a.Packery.Rect)}(window,function(a,b,c){var d=a("transform"),e=function(){b.Item.apply(this,arguments)};e.prototype=new b.Item;var f=e.prototype._create;return e.prototype._create=function(){f.call(this),this.rect=new c,this.placeRect=new c},e.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&d&&(this.element.style[d]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},e.prototype.dragMove=function(a,b){this.didDrag=!0;var c=this.layout.size;a-=c.paddingLeft,b-=c.paddingTop,this.positionPlaceRect(a,b)},e.prototype.dragStop=function(){this.getPosition();var a=this.position.x!=this.placeRect.x,b=this.position.y!=this.placeRect.y;this.needsPositioning=a||b,this.didDrag=!1},e.prototype.positionPlaceRect=function(a,b,c){this.placeRect.x=this.getPlaceRectCoord(a,!0),this.placeRect.y=this.getPlaceRectCoord(b,!1,c)},e.prototype.getPlaceRectCoord=function(a,b,c){var d=b?"Width":"Height",e=this.size["outer"+d],f=this.layout[b?"columnWidth":"rowHeight"],g=this.layout.size["inner"+d];b||(g=Math.max(g,this.layout.maxY),this.layout.rowHeight||(g-=this.layout.gutter));var h;if(f){f+=this.layout.gutter,g+=b?this.layout.gutter:0,a=Math.round(a/f);var i;i=this.layout.options.isHorizontal?b?"ceil":"floor":b?"floor":"ceil";var j=Math[i](g/f);j-=Math.ceil(e/f),h=j}else h=g-e;return a=c?a:Math.min(a,h),a*=f||1,Math.max(0,a)},e.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},e.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},e}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/packery",["classie/classie","get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],b):"object"==typeof exports?module.exports=b(require("desandro-classie"),require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):a.Packery=b(a.classie,a.getSize,a.Outlayer,a.Packery.Rect,a.Packery.Packer,a.Packery.Item)}(window,function(a,b,c,d,e,f){function g(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}function h(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}d.prototype.canFit=function(a){return this.width>=a.width-1&&this.height>=a.height-1};var i=c.create("packery");return i.Item=f,i.prototype._create=function(){c.prototype._create.call(this),this.packer=new e,this.stamp(this.options.stamped);var a=this;this.handleDraggabilly={dragStart:function(){a.itemDragStart(this.element)},dragMove:function(){a.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){a.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(b){a.itemDragStart(b.currentTarget)},drag:function(b,c){a.itemDragMove(b.currentTarget,c.position.left,c.position.top)},stop:function(b){a.itemDragEnd(b.currentTarget)}}},i.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var a=this.packer;this.options.isHorizontal?(a.width=Number.POSITIVE_INFINITY,a.height=this.size.innerHeight+this.gutter,a.sortDirection="rightwardTopToBottom"):(a.width=this.size.innerWidth+this.gutter,a.height=Number.POSITIVE_INFINITY,a.sortDirection="downwardLeftToRight"),a.reset(),this.maxY=0,this.maxX=0},i.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},i.prototype._getItemLayoutPosition=function(a){return this._packItem(a),a.rect},i.prototype._packItem=function(a){this._setRectSize(a.element,a.rect),this.packer.pack(a.rect),this._setMaxXY(a.rect)},i.prototype._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX),this.maxY=Math.max(a.y+a.height,this.maxY)},i.prototype._setRectSize=function(a,c){var d=b(a),e=d.outerWidth,f=d.outerHeight;(e||f)&&(e=this._applyGridGutter(e,this.columnWidth),f=this._applyGridGutter(f,this.rowHeight)),c.width=Math.min(e,this.packer.width),c.height=Math.min(f,this.packer.height)},i.prototype._applyGridGutter=function(a,b){if(!b)return a+this.gutter;b+=this.gutter;var c=a%b,d=c&&1>c?"round":"ceil";return a=Math[d](a/b)*b},i.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},i.prototype._manageStamp=function(a){var b,c=this.getItem(a);if(c&&c.isPlacing)b=c.placeRect;else{var e=this._getElementOffset(a);b=new d({x:this.options.isOriginLeft?e.left:e.right,y:this.options.isOriginTop?e.top:e.bottom})}this._setRectSize(a,b),this.packer.placed(b),this._setMaxXY(b)},i.prototype.sortItemsByPosition=function(){var a=this.options.isHorizontal?h:g;this.items.sort(a)},i.prototype.fit=function(a,b,c){var d=this.getItem(a);d&&(this._getMeasurements(),this.stamp(d.element),d.getSize(),d.isPlacing=!0,b=void 0===b?d.rect.x:b,c=void 0===c?d.rect.y:c,d.positionPlaceRect(b,c,!0),this._bindFitEvents(d),d.moveTo(d.placeRect.x,d.placeRect.y),this.layout(),this.unstamp(d.element),this.sortItemsByPosition(),d.isPlacing=!1,d.copyPlaceRectPosition())},i.prototype._bindFitEvents=function(a){function b(){d++,2==d&&c.emitEvent("fitComplete",[a])}var c=this,d=0;a.on("layout",function(){return b(),!0}),this.on("layoutComplete",function(){return b(),!0})},i.prototype.resize=function(){var a=b(this.element),c=this.size&&a,d=this.options.isHorizontal?"innerHeight":"innerWidth";c&&a[d]==this.size[d]||this.layout()},i.prototype.itemDragStart=function(a){this.stamp(a);var b=this.getItem(a);b&&b.dragStart()},i.prototype.itemDragMove=function(a,b,c){function d(){f.layout(),delete f.dragTimeout}var e=this.getItem(a);e&&e.dragMove(b,c);var f=this;this.clearDragTimeout(),this.dragTimeout=setTimeout(d,40)},i.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},i.prototype.itemDragEnd=function(b){var c,d=this.getItem(b);if(d&&(c=d.didDrag,d.dragStop()),!d||!c&&!d.needsPositioning)return void this.unstamp(b);a.add(d.element,"is-positioning-post-drag");var e=this._getDragEndLayoutComplete(b,d);d.needsPositioning?(d.on("layout",e),d.moveTo(d.placeRect.x,d.placeRect.y)):d&&d.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",e),this.layout()},i.prototype._getDragEndLayoutComplete=function(b,c){var d=c&&c.needsPositioning,e=0,f=d?2:1,g=this;return function(){return e++,e!=f?!0:(c&&(a.remove(c.element,"is-positioning-post-drag"),c.isPlacing=!1,c.copyPlaceRectPosition()),g.unstamp(b),g.sortItemsByPosition(),d&&g.emitEvent("dragItemPositioned",[c]),!0)}},i.prototype.bindDraggabillyEvents=function(a){a.on("dragStart",this.handleDraggabilly.dragStart),a.on("dragMove",this.handleDraggabilly.dragMove),a.on("dragEnd",this.handleDraggabilly.dragEnd)},i.prototype.bindUIDraggableEvents=function(a){a.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},i.Rect=d,i.Packer=e,i}),function(a,b){"function"==typeof define&&define.amd?define(["isotope/js/layout-mode","packery/js/packery","get-size/get-size"],b):"object"==typeof exports?module.exports=b(require("isotope-layout/js/layout-mode"),require("packery"),require("get-size")):b(a.Isotope.LayoutMode,a.Packery,a.getSize)}(window,function(a,b,c){function d(a,b){for(var c in b)a[c]=b[c];return a}var e=a.create("packery"),f=e.prototype._getElementOffset,g=e.prototype._getMeasurement;d(e.prototype,b.prototype),e.prototype._getElementOffset=f,e.prototype._getMeasurement=g;var h=e.prototype._resetLayout;e.prototype._resetLayout=function(){this.packer=this.packer||new b.Packer,h.apply(this,arguments)};var i=e.prototype._getItemLayoutPosition;e.prototype._getItemLayoutPosition=function(a){return a.rect=a.rect||new b.Rect,i.call(this,a)};var j=e.prototype._manageStamp;return e.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,j.apply(this,arguments)},e.prototype.needsResizeLayout=function(){var a=c(this.element),b=this.size&&a,d=this.options.isHorizontal?"innerHeight":"innerWidth";return b&&a[d]!=this.size[d]},e});\ No newline at end of filediff --git a/web/font/OpenSans-Italic.ttf b/web/font/OpenSans-Italic.ttfnew file mode 100755index 000000000..c90da48ffBinary files /dev/null and b/web/font/OpenSans-Italic.ttf differdiff --git a/web/font/OpenSans-Light.ttf b/web/font/OpenSans-Light.ttfnew file mode 100755index 000000000..0d381897dBinary files /dev/null and b/web/font/OpenSans-Light.ttf differdiff --git a/web/font/OpenSans-Regular.ttf b/web/font/OpenSans-Regular.ttfnew file mode 100755index 000000000..db433349bBinary files /dev/null and b/web/font/OpenSans-Regular.ttf differdiff --git a/web/font/Play-Bold.ttf b/web/font/Play-Bold.ttfdeleted file mode 100755index 7b9d5bf0b..000000000Binary files a/web/font/Play-Bold.ttf and /dev/null differdiff --git a/web/font/Play-Regular.ttf b/web/font/Play-Regular.ttfdeleted file mode 100755index 57ab4b1a9..000000000Binary files a/web/font/Play-Regular.ttf and /dev/null differdiff --git a/web/images/wv-icons.png b/web/images/wv-icons.pngnew file mode 100644index 000000000..175f2e200Binary files /dev/null and b/web/images/wv-icons.png differdiff --git a/web/index.html b/web/index.htmlindex 55a1fd3f5..fa56d0d7e 100644--- a/web/index.html+++ b/web/index.html@@ -133,6 +133,8 @@<!-- link.dev --> <script type="text/javascript" src="ext/layers/isotope/isotope.pkgd.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/ui/layers/isotope.pkgd.min.js"></script> -->+ <!-- link.dev --> <script type="text/javascript" src="ext/layers/isotope/packery-mode.pkgd.js"></script>+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/ui/layers/packery-mode.pkgd.min.js"></script> --><!-- link.prod --> <!-- <script type="text/javascript" src="js/wv.js?v=20131218215115174&mobile"></script> -->@@ -313,13 +315,17 @@</div><div id="product-modal"><div class="grid">+ <div class="grid-item grid-item--width3 grid-item--height2">...</div>+ <div class="grid-item grid-item--width2">Test Test font</div><div class="grid-item">...</div>- <div class="grid-item grid-item--width2">...</div><div class="grid-item">...</div><div class="grid-item">...</div><div class="grid-item">...</div><div class="grid-item">...</div><div class="grid-item">...</div>+ <div class="grid-item grid-item--height3 grid-item--width2">...</div>+ <div class="grid-item grid-item--height3 grid-item--width2">...</div>+ <div class="grid-item">...</div><div class="grid-item">...</div><div class="grid-item">...</div></div>diff --git a/web/js/layers/wv.layers.active.js b/web/js/layers/wv.layers.active.jsindex 108cd89fc..f8fb3fd81 100644--- a/web/js/layers/wv.layers.active.js+++ b/web/js/layers/wv.layers.active.js@@ -76,11 +76,12 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {$(self.selector).delegate(".close" ,'click', removeLayer);$(self.selector).delegate(".hideReg" ,'click', toggleVisibility);- $("." + self.id + "category").sortable({+ $("#" + self.id + " ul.category").sortable({items: "li:not(.head)",axis: "y",containment: "parent",- tolerance: "pointer"+ tolerance: "pointer",+ placeholder: "state-saver"});$("." + self.id + "category li").disableSelection();diff --git a/web/js/layers/wv.layers.modal.js b/web/js/layers/wv.layers.modal.jsindex 9ef2540bb..6452a87db 100644--- a/web/js/layers/wv.layers.modal.js+++ b/web/js/layers/wv.layers.modal.js@@ -18,13 +18,47 @@ wv.layers = wv.layers || {};/*** @class wv.layers.modal*/-wv.layers.add = wv.layers.modal || function(models, ui, config) {+wv.layers.modal = wv.layers.modal || function(models, ui, config) {var model = models.layers;+ var $addBtn = $("#layers-add");var self = {};+ var resize = function(){+ var h = $(window).height() - 200;+ var w = $(window).width() - 200;+ $( "#product-modal" ).dialog({+ height: h,+ width: w,+ });+ };+var init = function(){+ var h = $(window).height() - 200;+ var w = $(window).width() - 200;+ $addBtn.click(function(e){+ $( "#product-modal" ).dialog({+ resizable: false,+ height:h,+ width:w,+ modal: true,+ dialogClass:"layer-modal",+ draggable: false,+ title: "Search"+ });+ $('.grid').isotope({+ // options+ itemSelector: '.grid-item',+ layoutMode: 'packery',+ packery: {+ gutter: 10+ },++ });+ });++ $(window).resize(resize);};init();diff --git a/web/js/wv.main.js b/web/js/wv.main.jsindex 56573adaf..7a993f5af 100644--- a/web/js/wv.main.js+++ b/web/js/wv.main.js@@ -151,7 +151,8 @@ $(function() {ui.proj = wv.proj.ui(models, config);ui.sidebar = wv.layers.sidebar(models, config);ui.activeLayers = wv.layers.active(models, ui, config);- ui.addLayers = wv.layers.add(models, ui, config);+ ui.addModal = wv.layers.modal(models, ui, config);+ //ui.addLayers = wv.layers.add(models, ui, config);if ( config.startDate ) {ui.timeline = wv.date.timeline(models, config, ui);ui.timeline.data = wv.date.timeline.data(models, config, ui);