Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 14552c9

Browse files
committed
docs(docs):
1 parent 2b1eae4 commit 14552c9

File tree

7 files changed

+56
-62
lines changed

7 files changed

+56
-62
lines changed

dist/jquery.gridstrap.css

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,21 @@
66
* Made by Ross P
77
* Under MIT License
88
*/
9-
109
.gridstrap-cell-visible{
1110
position: absolute !important;
12-
transition:width 1.5s, height 0.5s, left 1.5s, top 1.5s ;
13-
transition:width 0.2s, height 0.2s, left 0.2s, top 0.2s ;
11+
transition:width 0.2s, height 0.2s, left 0.2s, top 0.2s ;
1412
}
1513
.gridstrap-cell-hidden{
16-
opacity: 0.1;
14+
opacity: 0;
1715
pointer-events: none;
1816
}
1917
.gridstrap-cell-drag{
20-
transition:width 0.1s, height 0.1s, left 0.1s, top 0.1s ;
21-
z-index: 10000;
22-
/*pointer-events: none;*/
18+
transition:width 0.05s, height 0.05s, left 0.05s, top 0.05s ;
19+
z-index: 10000;
2320
}
2421
.gridstrap-cell-resize{
25-
transition: none;
26-
z-index: 10000;
27-
22+
transition:width 0.05s, height 0.05s, left 0.05s, top 0.05s ;
23+
z-index: 10000;
2824
}
2925
.gridstack-noncontiguous{
3026
opacity: 0.02;

dist/jquery.gridstrap.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ var Methods = (function () {
902902
var event = $.Event(_constants2['default'].EVENT_CELL_REDRAW, {
903903
left: positionAndSize.left,
904904
top: positionAndSize.top,
905-
width: positionAndSize.left,
906-
height: positionAndSize.top,
905+
width: positionAndSize.width,
906+
height: positionAndSize.height,
907907
target: $cell[0]
908908
});
909909
$element.trigger(event);
@@ -976,26 +976,26 @@ var Methods = (function () {
976976
return $insertedCell;
977977
};
978978

979-
Methods.prototype.attachCell = function attachCell(selector) {
979+
Methods.prototype.attachCell = function attachCell(element) {
980980
var $ = this.setup.jQuery;
981981
var options = this.setup.Options;
982982
var $element = this.setup.$Element;
983983

984-
if (!$(selector).closest($element).is($element)) {
984+
if (!$(element).closest($element).is($element)) {
985985
throw new Error(_constants2['default'].ERROR_INVALID_ATTACH_ELEMENT);
986986
}
987987

988-
this.internal.InitCellsHiddenCopyAndSetAbsolutePosition(selector);
988+
this.internal.InitCellsHiddenCopyAndSetAbsolutePosition(element);
989989

990990
this.updateVisibleCellCoordinates();
991991

992-
return $(selector);
992+
return $(element);
993993
};
994994

995-
Methods.prototype.detachCell = function detachCell(selector) {
995+
Methods.prototype.detachCell = function detachCell(element) {
996996
var options = this.setup.Options;
997997

998-
var cellNIndex = this.internal.GetCellAndInternalIndex(selector);
998+
var cellNIndex = this.internal.GetCellAndInternalIndex(element);
999999

10001000
var $hiddenClone = cellNIndex.$cell.data(_constants2['default'].DATA_HIDDEN_CELL);
10011001

@@ -1016,22 +1016,24 @@ var Methods = (function () {
10161016
return array.splice(cellNIndex.index, 1);
10171017
});
10181018

1019+
this.updateVisibleCellCoordinates();
1020+
10191021
return $reattachedOriginalCell;
10201022
};
10211023

1022-
Methods.prototype.removeCell = function removeCell(selector) {
1023-
var $detachedCell = this.detachCell(selector);
1024+
Methods.prototype.removeCell = function removeCell(element) {
1025+
var $detachedCell = this.detachCell(element);
10241026

10251027
$detachedCell.remove();
10261028

10271029
this.updateVisibleCellCoordinates();
10281030
};
10291031

1030-
Methods.prototype.moveCell = function moveCell(selector, toIndex, targetGridstrap) {
1032+
Methods.prototype.moveCell = function moveCell(element, toIndex, targetGridstrap) {
10311033
// targetGridstrap optional..
10321034
var context = this.setup.Context;
10331035

1034-
var cellNIndex = this.internal.GetCellAndInternalIndex(selector);
1036+
var cellNIndex = this.internal.GetCellAndInternalIndex(element);
10351037

10361038
var $existingVisibleCells = this.$getCells();
10371039

@@ -1079,7 +1081,7 @@ var Methods = (function () {
10791081
return this.internal.$GetHiddenCellsInElementOrder();
10801082
};
10811083

1082-
Methods.prototype.getCellContainer = function getCellContainer() {
1084+
Methods.prototype.$getCellContainer = function $getCellContainer() {
10831085
var $ = this.setup.jQuery;
10841086

10851087
return $(this.setup.VisibleCellContainerSelector);
@@ -1093,15 +1095,14 @@ var Methods = (function () {
10931095
};
10941096

10951097
Methods.prototype.getCellIndexOfElement = function getCellIndexOfElement(element) {
1096-
// could be selector
10971098
var $cell = this.$getCellOfElement(element);
10981099

10991100
var $cells = this.$getCells();
11001101

11011102
return $cells.index($cell);
11021103
};
11031104

1104-
Methods.prototype.setAdditionalGridstrapDragTarget = function setAdditionalGridstrapDragTarget(selector) {
1105+
Methods.prototype.setAdditionalGridstrapDragTarget = function setAdditionalGridstrapDragTarget(element) {
11051106
var $ = this.setup.jQuery;
11061107
var eventHandlers = this.handlers;
11071108

@@ -1118,7 +1119,7 @@ var Methods = (function () {
11181119
});
11191120
}
11201121

1121-
self.internal.AdditionalGridstrapDragTargetSelector = selector;
1122+
self.internal.AdditionalGridstrapDragTargetSelector = element;
11221123

11231124
// handle certain mouse event for potential other gridstraps.
11241125
if (self.internal.AdditionalGridstrapDragTargetSelector) {

dist/jquery.gridstrap.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/jquery.gridstrap.min.js.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.

docs/jquery.gridstrap.css

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,21 @@
66
* Made by Ross P
77
* Under MIT License
88
*/
9-
109
.gridstrap-cell-visible{
1110
position: absolute !important;
12-
transition:width 1.5s, height 0.5s, left 1.5s, top 1.5s ;
13-
transition:width 0.2s, height 0.2s, left 0.2s, top 0.2s ;
11+
transition:width 0.2s, height 0.2s, left 0.2s, top 0.2s ;
1412
}
1513
.gridstrap-cell-hidden{
16-
opacity: 0.1;
14+
opacity: 0;
1715
pointer-events: none;
1816
}
1917
.gridstrap-cell-drag{
20-
transition:width 0.1s, height 0.1s, left 0.1s, top 0.1s ;
21-
z-index: 10000;
22-
/*pointer-events: none;*/
18+
transition:width 0.05s, height 0.05s, left 0.05s, top 0.05s ;
19+
z-index: 10000;
2320
}
2421
.gridstrap-cell-resize{
25-
transition: none;
26-
z-index: 10000;
27-
22+
transition:width 0.05s, height 0.05s, left 0.05s, top 0.05s ;
23+
z-index: 10000;
2824
}
2925
.gridstack-noncontiguous{
3026
opacity: 0.02;

docs/jquery.gridstrap.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,8 @@ var Methods = (function () {
910910
var event = $.Event(_constants2['default'].EVENT_CELL_REDRAW, {
911911
left: positionAndSize.left,
912912
top: positionAndSize.top,
913-
width: positionAndSize.left,
914-
height: positionAndSize.top,
913+
width: positionAndSize.width,
914+
height: positionAndSize.height,
915915
target: $cell[0]
916916
});
917917
$element.trigger(event);
@@ -984,26 +984,26 @@ var Methods = (function () {
984984
return $insertedCell;
985985
};
986986

987-
Methods.prototype.attachCell = function attachCell(selector) {
987+
Methods.prototype.attachCell = function attachCell(element) {
988988
var $ = this.setup.jQuery;
989989
var options = this.setup.Options;
990990
var $element = this.setup.$Element;
991991

992-
if (!$(selector).closest($element).is($element)) {
992+
if (!$(element).closest($element).is($element)) {
993993
throw new Error(_constants2['default'].ERROR_INVALID_ATTACH_ELEMENT);
994994
}
995995

996-
this.internal.InitCellsHiddenCopyAndSetAbsolutePosition(selector);
996+
this.internal.InitCellsHiddenCopyAndSetAbsolutePosition(element);
997997

998998
this.updateVisibleCellCoordinates();
999999

1000-
return $(selector);
1000+
return $(element);
10011001
};
10021002

1003-
Methods.prototype.detachCell = function detachCell(selector) {
1003+
Methods.prototype.detachCell = function detachCell(element) {
10041004
var options = this.setup.Options;
10051005

1006-
var cellNIndex = this.internal.GetCellAndInternalIndex(selector);
1006+
var cellNIndex = this.internal.GetCellAndInternalIndex(element);
10071007

10081008
var $hiddenClone = cellNIndex.$cell.data(_constants2['default'].DATA_HIDDEN_CELL);
10091009

@@ -1024,22 +1024,24 @@ var Methods = (function () {
10241024
return array.splice(cellNIndex.index, 1);
10251025
});
10261026

1027+
this.updateVisibleCellCoordinates();
1028+
10271029
return $reattachedOriginalCell;
10281030
};
10291031

1030-
Methods.prototype.removeCell = function removeCell(selector) {
1031-
var $detachedCell = this.detachCell(selector);
1032+
Methods.prototype.removeCell = function removeCell(element) {
1033+
var $detachedCell = this.detachCell(element);
10321034

10331035
$detachedCell.remove();
10341036

10351037
this.updateVisibleCellCoordinates();
10361038
};
10371039

1038-
Methods.prototype.moveCell = function moveCell(selector, toIndex, targetGridstrap) {
1040+
Methods.prototype.moveCell = function moveCell(element, toIndex, targetGridstrap) {
10391041
// targetGridstrap optional..
10401042
var context = this.setup.Context;
10411043

1042-
var cellNIndex = this.internal.GetCellAndInternalIndex(selector);
1044+
var cellNIndex = this.internal.GetCellAndInternalIndex(element);
10431045

10441046
var $existingVisibleCells = this.$getCells();
10451047

@@ -1087,7 +1089,7 @@ var Methods = (function () {
10871089
return this.internal.$GetHiddenCellsInElementOrder();
10881090
};
10891091

1090-
Methods.prototype.getCellContainer = function getCellContainer() {
1092+
Methods.prototype.$getCellContainer = function $getCellContainer() {
10911093
var $ = this.setup.jQuery;
10921094

10931095
return $(this.setup.VisibleCellContainerSelector);
@@ -1101,15 +1103,14 @@ var Methods = (function () {
11011103
};
11021104

11031105
Methods.prototype.getCellIndexOfElement = function getCellIndexOfElement(element) {
1104-
// could be selector
11051106
var $cell = this.$getCellOfElement(element);
11061107

11071108
var $cells = this.$getCells();
11081109

11091110
return $cells.index($cell);
11101111
};
11111112

1112-
Methods.prototype.setAdditionalGridstrapDragTarget = function setAdditionalGridstrapDragTarget(selector) {
1113+
Methods.prototype.setAdditionalGridstrapDragTarget = function setAdditionalGridstrapDragTarget(element) {
11131114
var $ = this.setup.jQuery;
11141115
var eventHandlers = this.handlers;
11151116

@@ -1126,7 +1127,7 @@ var Methods = (function () {
11261127
});
11271128
}
11281129

1129-
self.internal.AdditionalGridstrapDragTargetSelector = selector;
1130+
self.internal.AdditionalGridstrapDragTargetSelector = element;
11301131

11311132
// handle certain mouse event for potential other gridstraps.
11321133
if (self.internal.AdditionalGridstrapDragTargetSelector) {

docs/responsive.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@
77
<meta name="description" content=""/>
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<meta name="theme-color" content="#157878">
10-
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
10+
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
1111

12-
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
12+
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
1313

14+
<link rel="stylesheet" href="./jquery,gridstrap.css">
1415
<link rel="stylesheet" href="./indexstyle.css">
15-
<link rel="stylesheet" href="../style.css">
1616

1717
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
1818
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
1919
<!--[if lt IE 9]>
20-
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
21-
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
20+
<script src="//oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
21+
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
2222
<![endif]-->
2323

2424
</head>
2525
<body>
2626
<div id="responsive-grid" ></div>
2727

2828
<script
29-
src="http://code.jquery.com/jquery-3.2.1.js"
29+
src="//code.jquery.com/jquery-3.2.1.js"
3030
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
3131
crossorigin="anonymous"></script>
3232

33-
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
33+
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
3434

35-
<script src="../dist/gridstrap.js"></script>
35+
<script src="./jquery.gridstrap.js"></script>
3636
<script >
3737
window.addEventListener('message', function() {
3838
$('#responsive-grid').gridstrap();

0 commit comments

Comments
 (0)