Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destroy() should also reset width and height #51

Open
av01d opened this issue May 28, 2024 · 0 comments
Open

destroy() should also reset width and height #51

av01d opened this issue May 28, 2024 · 0 comments

Comments

@av01d
Copy link

av01d commented May 28, 2024

When calling destroy on an instance, the css width and height values remain. They should be removed.
Fix is this: change

$handle = getHandle(opt.handleSelector, $el);
$handle.off("mousedown." + opt.instanceId + " touchstart." + opt.instanceId);
if (opt.touchActionNone)
   $handle.css("touch-action", "");
$el.removeClass("resizable");
return;

to this

$handle = getHandle(opt.handleSelector, $el);
$handle.off("mousedown." + opt.instanceId + " touchstart." + opt.instanceId);
if (opt.touchActionNone)
   $handle.css("touch-action", "");
$el.removeClass("resizable");
$el.css({width:'', height:''});
return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant