Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Export on the correct scope for each environment. #945

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

Merged
merged 3 commits into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/gridstack.all.js

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions dist/gridstack.jQueryUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'lodash', 'gridstack', 'jquery-ui/data', 'jquery-ui/disable-selection', 'jquery-ui/focusable',
'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels', 'jquery-ui/jquery-1-7',
'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur', 'jquery-ui/scroll-parent',
'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version', 'jquery-ui/widget',
'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable', 'jquery-ui/widgets/droppable',
'jquery-ui/widgets/resizable'], factory);
define(['jquery', 'lodash', 'gridstack', 'exports', 'jquery-ui/data', 'jquery-ui/disable-selection',
'jquery-ui/focusable', 'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels',
'jquery-ui/jquery-1-7', 'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur',
'jquery-ui/scroll-parent', 'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version',
'jquery-ui/widget', 'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable',
'jquery-ui/widgets/droppable', 'jquery-ui/widgets/resizable'], factory);
} else if (typeof exports !== 'undefined') {
try { jQuery = require('jquery'); } catch (e) {}
try { _ = require('lodash'); } catch (e) {}
try { GridStackUI = require('gridstack'); } catch (e) {}
factory(jQuery, _, GridStackUI);
try { gridstack = require('gridstack'); } catch (e) {}
factory(jQuery, _, gridstack.GridStackUI, exports);
} else {
factory(jQuery, _, GridStackUI);
factory(jQuery, _, GridStackUI, window);
}
})(function($, _, GridStackUI) {

var scope = window;

})(function($, _, GridStackUI, scope) {
/**
* @class JQueryUIGridStackDragDropPlugin
* jQuery UI implementation of drag'n'drop gridstack plugin.
Expand Down Expand Up @@ -91,5 +88,7 @@
return this;
};

scope.JQueryUIGridStackDragDropPlugin = JQueryUIGridStackDragDropPlugin;

return JQueryUIGridStackDragDropPlugin;
});
2 changes: 1 addition & 1 deletion dist/gridstack.jQueryUI.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions dist/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'lodash'], factory);
define(['jquery', 'lodash', 'exports'], factory);
} else if (typeof exports !== 'undefined') {
try { jQuery = require('jquery'); } catch (e) {}
try { _ = require('lodash'); } catch (e) {}
factory(jQuery, _);
factory(jQuery, _, exports);
} else {
factory(jQuery, _);
factory(jQuery, _, window);
}
})(function($, _) {

var scope = window;

})(function($, _, scope) {
var obsolete = function(f, oldName, newName) {
var wrapper = function() {
console.warn('gridstack.js: Function `' + oldName + '` is deprecated as of v0.2.5 and has been replaced ' +
Expand Down Expand Up @@ -1210,6 +1207,10 @@
node.lastTriedHeight = height;
self.grid.moveNode(node, x, y, width, height);
self._updateContainerHeight();

if (event.type == 'resize') {
$(event.target).trigger('gsresize', node);
}
};

var onStartMoving = function(event, ui) {
Expand Down
2 changes: 1 addition & 1 deletion dist/gridstack.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gridstack.min.map

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions src/gridstack.jQueryUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'lodash', 'gridstack', 'jquery-ui/data', 'jquery-ui/disable-selection', 'jquery-ui/focusable',
'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels', 'jquery-ui/jquery-1-7',
'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur', 'jquery-ui/scroll-parent',
'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version', 'jquery-ui/widget',
'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable', 'jquery-ui/widgets/droppable',
'jquery-ui/widgets/resizable'], factory);
define(['jquery', 'lodash', 'gridstack', 'exports', 'jquery-ui/data', 'jquery-ui/disable-selection',
'jquery-ui/focusable', 'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels',
'jquery-ui/jquery-1-7', 'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur',
'jquery-ui/scroll-parent', 'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version',
'jquery-ui/widget', 'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable',
'jquery-ui/widgets/droppable', 'jquery-ui/widgets/resizable'], factory);
} else if (typeof exports !== 'undefined') {
try { jQuery = require('jquery'); } catch (e) {}
try { _ = require('lodash'); } catch (e) {}
try { GridStackUI = require('gridstack'); } catch (e) {}
factory(jQuery, _, GridStackUI);
try { gridstack = require('gridstack'); } catch (e) {}
factory(jQuery, _, gridstack.GridStackUI, exports);
} else {
factory(jQuery, _, GridStackUI);
factory(jQuery, _, GridStackUI, window);
}
})(function($, _, GridStackUI) {

var scope = window;

})(function($, _, GridStackUI, scope) {
/**
* @class JQueryUIGridStackDragDropPlugin
* jQuery UI implementation of drag'n'drop gridstack plugin.
Expand Down Expand Up @@ -91,5 +88,7 @@
return this;
};

scope.JQueryUIGridStackDragDropPlugin = JQueryUIGridStackDragDropPlugin;

return JQueryUIGridStackDragDropPlugin;
});
11 changes: 4 additions & 7 deletions src/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'lodash'], factory);
define(['jquery', 'lodash', 'exports'], factory);
} else if (typeof exports !== 'undefined') {
try { jQuery = require('jquery'); } catch (e) {}
try { _ = require('lodash'); } catch (e) {}
factory(jQuery, _);
factory(jQuery, _, exports);
} else {
factory(jQuery, _);
factory(jQuery, _, window);
}
})(function($, _) {

var scope = window;

})(function($, _, scope) {
var obsolete = function(f, oldName, newName) {
var wrapper = function() {
console.warn('gridstack.js: Function `' + oldName + '` is deprecated as of v0.2.5 and has been replaced ' +
Expand Down