hootsuite / grid

Drag and drop library for two-dimensional, resizable and responsive lists
http://hootsuite.github.io/grid/
Apache License 2.0
3.57k stars 279 forks source link

this._adjustSizeOfItems is not a function #119

Open husseinelhussein opened 6 years ago

husseinelhussein commented 6 years ago

Hello and thanks for this package, i really liked it and i've been trying to get it working for almost 2 days i've webpack and i had this error coming from the package code: this._adjustSizeOfItems is not a function and this is the files content

app.js:

window.$ = require('jquery');
require('jquery-ui');
require('../../../vendor/tcg/voyager/resources/assets/js/app');
window.gridList = require('grid-list')($);
require('./gallery');

gallery.js:

$(document).ready(function() {
    $('#grid').gridList({
        lanes: 3,
        widthHeightRatio: 264 / 294,
        heightToFontSizeRatio: 0.25,
    });
});

html:

<div id="grid">
    <div id="grid_item">
        <p>1</p>
    </div>
    <div class="grid-item">
        <p>1</p>
    </div>
</div> 
<script type="text/javascript" src="app.js"></script>

package.json:

"grid-list": "0.4.1",
"jquery": "3.2.1",
"jquery-ui": "1.12.1"

any help is appreciated