Open noctivityinc opened 10 years ago
We are initializing shapeshift as such:
$tileContainer.shapeshift dragWhitelist: '.tile.draggable' enableDrag: true cutoffStart: 2
and have some draggable and non draggable tiles:
<div class='tileContainer'> <div class="tile"></div> <div class="tile"></div> <div class="tile draggable"></div> <div class="tile draggable"></div> <div class="tile draggable"></div> </div>
when we add an item to the tile container like such:
$tile.insertAfter('.tile:first')
we need to call ss-destroy to bind the new item (calling ss-rearrange did NOT work to bind the inserted item).
If we call it like this (coffeescript):
$tileContainer.trigger("ss-destroy").shapeshift dragWhitelist: '.tile.draggable'
Then we get the error:
Uncaught Error: cannot call methods on draggable prior to initialization
But if we make every tile draggable then we do not get this error.
We are initializing shapeshift as such:
and have some draggable and non draggable tiles:
when we add an item to the tile container like such:
we need to call ss-destroy to bind the new item (calling ss-rearrange did NOT work to bind the inserted item).
If we call it like this (coffeescript):
Then we get the error:
But if we make every tile draggable then we do not get this error.