I can not seem to get the snap to grid feature to work on the below
code snippet... does a fine job of creating a resizable element, but
the snap fails.
$('#'+el).resizable({
ghost:true,
grid:50, // also tried '50px'
// containment:'#layout',
stop:function(){
//refactor redundant!
resizeH = $.evalJSON($('#metacache').text())
var h= $(this).height() + "px"
var w= $(this).width() + "px"
var cur = this.id
jQuery.each(resizeH, function(i,val){
if (i == cur) {
resizeH[i].properties.width = w
resizeH[i].properties.height = h
}
})
EtchaBuilder.metabuild($.toJSON(resizeH))
EtchaBuilder.Grid.format()
}})
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---