PageSourceSearch

https://estruc.com/wp-content/themes/estructure/js/isotope/bower_components/isotope-horizontal/horizontal.js

js estruc.com collected 2026-10-08 20:54:18 UTC 1,077 bytes, 54 lines download raw bytes

1/*!
2 * horizontal layout mode for Isotope
3 * http://isotope.metafizzy.co
4 */
5
6( function( window ) {
7
8'use strict';
9
10function horizontalDefinition( LayoutMode ) {
11
12  var Horizontal = LayoutMode.create( 'horizontal', {
13    verticalAlignment: 0
14  });
15
16  Horizontal.prototype._resetLayout = function() {
17    this.x = 0;
18  };
19
20  Horizontal.prototype._getItemLayoutPosition = function( item ) {
21    item.getSize();
22    var y = ( this.isotope.size.innerHeight - item.size.outerHeight ) *
23      this.options.verticalAlignment;
24    var x = this.x;
25    this.x += item.size.outerWidth;
26    return { x: x, y: y };
27  };
28
29  Horizontal.prototype._getContainerSize = function() {
30    return { width: this.x };
31  };
32
33  Horizontal.prototype.needsResizeLayout = function() {
34    return this.needsVerticalResizeLayout();
35  };
36
37  return Horizontal;
38
39}
40
41if ( typeof define === 'function' && define.amd ) {
42  // AMD
43  define( [
44      'isotope/js/layout-mode'
45    ],
46    horizontalDefinition );
47} else {
48  // browser global
49  horizontalDefinition(
50    window.Isotope.LayoutMode
51  );
52}
53
54})( window );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.