javascript - Recreate handles with jquery rotatable -
hi using minified plugin godswearhats call plugin
$('#em_1').rotatable();
here html code
<div class="draggable paragraph ui-draggable ui-resizable active resizableborder "id="em_1"> asdasd123123 <div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-n active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-w active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-s active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-e active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-nw active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-ne active-resizable" style="z-index: 90;"></div> <div class="ui-resizable-handle ui-resizable-sw active-resizable" style="z-index: 90;"></div> <div class="ui-rotatable-handle ui-draggable active-rotatable"></div> </div>
now there function in code removes part because need to.
<div class="ui-rotatable-handle ui-draggable active-rotatable"></div>
and after function need recreate rotatable handle. able reappend handle when calling $('#em_1').rotatable();
events lost. think there problem plugin don't know how fix it.
here link plugin https://raw.githubusercontent.com/godswearhats/jquery-ui-rotatable/master/jquery.ui.rotatable.min.js
you can use $(elem).detach()
(http://api.jquery.com/detach) on element want 'removed' , put later events intact.
Comments
Post a Comment