-
Notifications
You must be signed in to change notification settings - Fork 441
syntax refactor #477
base: master
Are you sure you want to change the base?
syntax refactor #477
Conversation
src/sortable.js
Outdated
@@ -20,119 +20,114 @@ angular.module('ui.sortable', []) | |||
uiSortable: '=' | |||
}, | |||
link: function(scope, element, attrs, ngModel) { | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm totally in favor of 'use strict', but this might cause errors in some ASP.Net environments.
jQuery prior v3 also didn't use 'use strict' for exactly that reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I remove this line! Thanks!
|
||
// update changed options | ||
angular.forEach(newVal, function(value, key) { | ||
// if it's a custom option of the directive, | ||
// handle it approprietly | ||
if (key in directiveOpts) { | ||
if (directiveOpts[key]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not equivalent in case of directiveOpts members with falsy values.
Please don't create a hure diff. Try not moving methods until the initial refactor gets reviewed. |
Only syntax refactor,
return null
;a in b
write inb.a
will more clear;_restore
and_destroy
were simplified asdelete item.sortable
.