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

Resizable: Modified to allow jquery objects as handles. Fixed #9658: #1377

Closed
wants to merge 4 commits into from

Conversation

patrixd
Copy link
Contributor

@patrixd patrixd commented Oct 24, 2014

Rebased

@@ -199,6 +204,9 @@ $.widget("ui.resizable", $.ui.mouse, {
if (this.handles[i].constructor === String) {
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
}
else if (this.handles[i] instanceof $) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also support DOMElements directly.

@tjvantoll
Copy link
Member

Hi @patrixd, and thanks for this. I verified your change works for jQuery objects but this change should also support DOMElements. Also make sure your code adheres to our style guide. If you run grunt it'll point out the current style violations. Don't worry too much about style because we can clean that up when we land this.

@patrixd
Copy link
Contributor Author

patrixd commented Nov 7, 2014

Thank you @tjvantoll for your assistance, I changed the code and now it supports DOMElements.
But I can't install grunt and work properly with nodejs in my job (the change if for an application from the company I work for). I have lot of limitations in the network and downloads. If it still is a problem I could try but in my house.
Thanks again.

@@ -199,6 +204,10 @@ $.widget("ui.resizable", $.ui.mouse, {
if (this.handles[i].constructor === String) {
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
}
else if (this.handles[i] && (this.handles[i].jquery || this.handles[i].nodeType)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first check here this.handles[i].jquery is unnecessary. The previous check is already looking at this.handles[i].constructor.

@tjvantoll
Copy link
Member

There are a bunch of style things to clean up, but other that and one small comment I listed above this looks good to me.

@tjvantoll
Copy link
Member

Replaced by #1445 where I took @patrixd's commit and cleaned up the formatting and such.

@tjvantoll tjvantoll closed this Feb 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants