Lines Matching refs:Layout

135   this.layoutModel_ = new Mosaic.Layout();
342 (Mosaic.Layout.PADDING_TOP + Mosaic.Layout.PADDING_BOTTOM));
642 * @param {Mosaic.Layout} layoutModel The layout model to use.
687 * @param {string=} opt_mode Layout mode.
688 * @param {Mosaic.Density=} opt_maxDensity Layout density.
691 Mosaic.Layout = function(opt_mode, opt_maxDensity) {
692 this.mode_ = opt_mode || Mosaic.Layout.MODE_TENTATIVE;
701 Mosaic.Layout.PADDING_TOP = 50;
706 Mosaic.Layout.PADDING_BOTTOM = 50;
712 Mosaic.Layout.SPACING = 10;
718 Mosaic.Layout.SCROLL_MARGIN = 30;
721 * Layout mode: commit to DOM immediately.
723 Mosaic.Layout.MODE_FINAL = 'final';
726 * Layout mode: do not commit layout to DOM until it is complete or the viewport
729 Mosaic.Layout.MODE_TENTATIVE = 'tentative';
732 * Layout mode: never commit layout to DOM.
734 Mosaic.Layout.MODE_DRY_RUN = 'dry_run';
741 Mosaic.Layout.prototype.reset_ = function() {
745 if (this.mode_ !== Mosaic.Layout.MODE_DRY_RUN) // DRY_RUN is sticky.
746 this.mode_ = Mosaic.Layout.MODE_TENTATIVE;
753 Mosaic.Layout.prototype.setViewportSize = function(width, height) {
762 Mosaic.Layout.prototype.getWidth = function() {
770 Mosaic.Layout.prototype.getHeight = function() {
778 Mosaic.Layout.prototype.getTiles = function() {
786 Mosaic.Layout.prototype.getTileCount = function() {
795 Mosaic.Layout.prototype.getLastColumn_ = function() {
802 Mosaic.Layout.prototype.getLaidOutTileCount = function() {
813 Mosaic.Layout.prototype.add = function(tile, isLast) {
817 // |Mosaic.Layout.density_| tracks the state of the 'global' backtracking
856 if (this.mode_ === Mosaic.Layout.MODE_FINAL && isFinalColumn) {
865 if (this.mode_ === Mosaic.Layout.MODE_TENTATIVE)
877 if (isFinalColumn && this.mode_ === Mosaic.Layout.MODE_TENTATIVE) {
896 Mosaic.Layout.prototype.commit_ = function(opt_offsetX, opt_offsetY) {
900 this.mode_ = Mosaic.Layout.MODE_FINAL;
913 * @return {Mosaic.Layout} A horizontally stretched layout.
916 Mosaic.Layout.prototype.findHorizontalLayout_ = function() {
931 var layout = new Mosaic.Layout(
932 Mosaic.Layout.MODE_DRY_RUN, this.density_.clone());
951 Mosaic.Layout.prototype.invalidateFromTile_ = function(index) {
960 console.assert(this.mode_ === Mosaic.Layout.MODE_FINAL,
967 this.mode_ = Mosaic.Layout.MODE_TENTATIVE;
978 Mosaic.Layout.prototype.getHorizontalAdjacentIndex = function(
1011 Mosaic.Layout.prototype.getVerticalAdjacentIndex = function(
1064 Mosaic.Layout.prototype.getColumnIndexByTile_ = function(index) {
1082 Mosaic.Layout.rescaleSizesToNewTotal = function(sizes, newTotal) {
1209 * @param {Mosaic.Density} density Layout density.
1350 Mosaic.Layout.rescaleSizesToNewTotal(this.rowHeights_, this.maxHeight_);
1389 var rowTop = Mosaic.Layout.PADDING_TOP;
1533 return Mosaic.Layout.SPACING * this.getTileCount();
1560 return contentHeight + Mosaic.Layout.SPACING;
1576 var contentHeight = height - Mosaic.Layout.SPACING;
1581 Mosaic.Layout.rescaleSizesToNewTotal(tileContentWidth, contentWidth);
1585 var tileWidth = tileContentWidth[t] + Mosaic.Layout.SPACING;
1952 var tileLeft = this.left_ - Mosaic.Layout.SCROLL_MARGIN;
1956 var tileRight = this.left_ + this.width_ + Mosaic.Layout.SCROLL_MARGIN;
1978 var margin = Mosaic.Layout.SPACING / 2;