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

Skip to content

Commit c6c5fe9

Browse files
authored
Merge pull request gridstack#945 from AdvancedClimateSystems/develop
Export on the correct scope for each environment.
2 parents 99365d6 + 8710a01 commit c6c5fe9

File tree

8 files changed

+40
-44
lines changed

8 files changed

+40
-44
lines changed

dist/gridstack.all.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.jQueryUI.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,21 @@
77
*/
88
(function(factory) {
99
if (typeof define === 'function' && define.amd) {
10-
define(['jquery', 'lodash', 'gridstack', 'jquery-ui/data', 'jquery-ui/disable-selection', 'jquery-ui/focusable',
11-
'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels', 'jquery-ui/jquery-1-7',
12-
'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur', 'jquery-ui/scroll-parent',
13-
'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version', 'jquery-ui/widget',
14-
'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable', 'jquery-ui/widgets/droppable',
15-
'jquery-ui/widgets/resizable'], factory);
10+
define(['jquery', 'lodash', 'gridstack', 'exports', 'jquery-ui/data', 'jquery-ui/disable-selection',
11+
'jquery-ui/focusable', 'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels',
12+
'jquery-ui/jquery-1-7', 'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur',
13+
'jquery-ui/scroll-parent', 'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version',
14+
'jquery-ui/widget', 'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable',
15+
'jquery-ui/widgets/droppable', 'jquery-ui/widgets/resizable'], factory);
1616
} else if (typeof exports !== 'undefined') {
1717
try { jQuery = require('jquery'); } catch (e) {}
1818
try { _ = require('lodash'); } catch (e) {}
19-
try { GridStackUI = require('gridstack'); } catch (e) {}
20-
factory(jQuery, _, GridStackUI);
19+
try { gridstack = require('gridstack'); } catch (e) {}
20+
factory(jQuery, _, gridstack.GridStackUI, exports);
2121
} else {
22-
factory(jQuery, _, GridStackUI);
22+
factory(jQuery, _, GridStackUI, window);
2323
}
24-
})(function($, _, GridStackUI) {
25-
26-
var scope = window;
27-
24+
})(function($, _, GridStackUI, scope) {
2825
/**
2926
* @class JQueryUIGridStackDragDropPlugin
3027
* jQuery UI implementation of drag'n'drop gridstack plugin.
@@ -91,5 +88,7 @@
9188
return this;
9289
};
9390

91+
scope.JQueryUIGridStackDragDropPlugin = JQueryUIGridStackDragDropPlugin;
92+
9493
return JQueryUIGridStackDragDropPlugin;
9594
});

dist/gridstack.jQueryUI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@
77
*/
88
(function(factory) {
99
if (typeof define === 'function' && define.amd) {
10-
define(['jquery', 'lodash'], factory);
10+
define(['jquery', 'lodash', 'exports'], factory);
1111
} else if (typeof exports !== 'undefined') {
1212
try { jQuery = require('jquery'); } catch (e) {}
1313
try { _ = require('lodash'); } catch (e) {}
14-
factory(jQuery, _);
14+
factory(jQuery, _, exports);
1515
} else {
16-
factory(jQuery, _);
16+
factory(jQuery, _, window);
1717
}
18-
})(function($, _) {
19-
20-
var scope = window;
21-
18+
})(function($, _, scope) {
2219
var obsolete = function(f, oldName, newName) {
2320
var wrapper = function() {
2421
console.warn('gridstack.js: Function `' + oldName + '` is deprecated as of v0.2.5 and has been replaced ' +
@@ -1210,6 +1207,10 @@
12101207
node.lastTriedHeight = height;
12111208
self.grid.moveNode(node, x, y, width, height);
12121209
self._updateContainerHeight();
1210+
1211+
if (event.type == 'resize') {
1212+
$(event.target).trigger('gsresize', node);
1213+
}
12131214
};
12141215

12151216
var onStartMoving = function(event, ui) {

dist/gridstack.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/gridstack.jQueryUI.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,21 @@
77
*/
88
(function(factory) {
99
if (typeof define === 'function' && define.amd) {
10-
define(['jquery', 'lodash', 'gridstack', 'jquery-ui/data', 'jquery-ui/disable-selection', 'jquery-ui/focusable',
11-
'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels', 'jquery-ui/jquery-1-7',
12-
'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur', 'jquery-ui/scroll-parent',
13-
'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version', 'jquery-ui/widget',
14-
'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable', 'jquery-ui/widgets/droppable',
15-
'jquery-ui/widgets/resizable'], factory);
10+
define(['jquery', 'lodash', 'gridstack', 'exports', 'jquery-ui/data', 'jquery-ui/disable-selection',
11+
'jquery-ui/focusable', 'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels',
12+
'jquery-ui/jquery-1-7', 'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur',
13+
'jquery-ui/scroll-parent', 'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version',
14+
'jquery-ui/widget', 'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable',
15+
'jquery-ui/widgets/droppable', 'jquery-ui/widgets/resizable'], factory);
1616
} else if (typeof exports !== 'undefined') {
1717
try { jQuery = require('jquery'); } catch (e) {}
1818
try { _ = require('lodash'); } catch (e) {}
19-
try { GridStackUI = require('gridstack'); } catch (e) {}
20-
factory(jQuery, _, GridStackUI);
19+
try { gridstack = require('gridstack'); } catch (e) {}
20+
factory(jQuery, _, gridstack.GridStackUI, exports);
2121
} else {
22-
factory(jQuery, _, GridStackUI);
22+
factory(jQuery, _, GridStackUI, window);
2323
}
24-
})(function($, _, GridStackUI) {
25-
26-
var scope = window;
27-
24+
})(function($, _, GridStackUI, scope) {
2825
/**
2926
* @class JQueryUIGridStackDragDropPlugin
3027
* jQuery UI implementation of drag'n'drop gridstack plugin.
@@ -91,5 +88,7 @@
9188
return this;
9289
};
9390

91+
scope.JQueryUIGridStackDragDropPlugin = JQueryUIGridStackDragDropPlugin;
92+
9493
return JQueryUIGridStackDragDropPlugin;
9594
});

src/gridstack.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@
77
*/
88
(function(factory) {
99
if (typeof define === 'function' && define.amd) {
10-
define(['jquery', 'lodash'], factory);
10+
define(['jquery', 'lodash', 'exports'], factory);
1111
} else if (typeof exports !== 'undefined') {
1212
try { jQuery = require('jquery'); } catch (e) {}
1313
try { _ = require('lodash'); } catch (e) {}
14-
factory(jQuery, _);
14+
factory(jQuery, _, exports);
1515
} else {
16-
factory(jQuery, _);
16+
factory(jQuery, _, window);
1717
}
18-
})(function($, _) {
19-
20-
var scope = window;
21-
18+
})(function($, _, scope) {
2219
var obsolete = function(f, oldName, newName) {
2320
var wrapper = function() {
2421
console.warn('gridstack.js: Function `' + oldName + '` is deprecated as of v0.2.5 and has been replaced ' +

0 commit comments

Comments
 (0)