easy-layout 5.1.1 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example.js +1779 -1734
- package/lib/constants.js +2 -8
- package/lib/cursor.js +30 -13
- package/lib/cursors.js +15 -0
- package/lib/div/column.js +7 -7
- package/lib/div/columns.js +7 -7
- package/lib/div/row.js +7 -7
- package/lib/div/rows.js +7 -7
- package/lib/div/sizeable.js +7 -7
- package/lib/div/splitter/horizontal.js +14 -8
- package/lib/div/splitter/vertical.js +14 -8
- package/lib/div/splitter.js +7 -7
- package/lib/example/div/row/blue.js +4 -4
- package/lib/example/div/row/yellow.js +4 -4
- package/lib/example/div/sizeable/bottom.js +4 -4
- package/lib/example/div/sizeable/left.js +4 -4
- package/lib/example/div/sizeable/right.js +4 -4
- package/lib/example/div/splitter/horizontal/main.js +4 -4
- package/lib/example/div/splitter/vertical/left.js +4 -4
- package/lib/example/div/splitter/vertical/right.js +4 -4
- package/lib/index.js +8 -1
- package/lib/section/sizeable.js +7 -7
- package/package.json +3 -3
- package/src/constants.js +0 -3
- package/src/cursor.js +29 -11
- package/src/cursors.js +6 -0
- package/src/div/splitter/horizontal.js +7 -3
- package/src/div/splitter/vertical.js +7 -3
- package/src/index.js +2 -0
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
|
@@ -29,11 +29,11 @@ function _defineProperty(obj, key, value) {
|
|
|
29
29
|
}
|
|
30
30
|
return obj;
|
|
31
31
|
}
|
|
32
|
-
function _getPrototypeOf(
|
|
32
|
+
function _getPrototypeOf(o1) {
|
|
33
33
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
34
34
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
35
35
|
};
|
|
36
|
-
return _getPrototypeOf(
|
|
36
|
+
return _getPrototypeOf(o1);
|
|
37
37
|
}
|
|
38
38
|
function _inherits(subClass, superClass) {
|
|
39
39
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -59,12 +59,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
59
59
|
}
|
|
60
60
|
return _assertThisInitialized(self);
|
|
61
61
|
}
|
|
62
|
-
function _setPrototypeOf(
|
|
62
|
+
function _setPrototypeOf(o2, p1) {
|
|
63
63
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
64
64
|
o.__proto__ = p;
|
|
65
65
|
return o;
|
|
66
66
|
};
|
|
67
|
-
return _setPrototypeOf(
|
|
67
|
+
return _setPrototypeOf(o2, p1);
|
|
68
68
|
}
|
|
69
69
|
function _taggedTemplateLiteral(strings, raw) {
|
|
70
70
|
if (!raw) {
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
+
Object.defineProperty(exports, "cursor", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _cursor.default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
5
11
|
Object.defineProperty(exports, "RowDiv", {
|
|
6
12
|
enumerable: true,
|
|
7
13
|
get: function() {
|
|
@@ -56,6 +62,7 @@ Object.defineProperty(exports, "HorizontalSplitterDiv", {
|
|
|
56
62
|
return _horizontal.default;
|
|
57
63
|
}
|
|
58
64
|
});
|
|
65
|
+
var _cursor = _interopRequireDefault(require("./cursor"));
|
|
59
66
|
var _row = _interopRequireDefault(require("./div/row"));
|
|
60
67
|
var _rows = _interopRequireDefault(require("./div/rows"));
|
|
61
68
|
var _column = _interopRequireDefault(require("./div/column"));
|
|
@@ -71,4 +78,4 @@ function _interopRequireDefault(obj) {
|
|
|
71
78
|
};
|
|
72
79
|
}
|
|
73
80
|
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbmV4cG9ydCB7IGRlZmF1bHQgYXMgY3Vyc29yIH0gZnJvbSBcIi4vY3Vyc29yXCI7XG5cbmV4cG9ydCB7IGRlZmF1bHQgYXMgUm93RGl2IH0gZnJvbSBcIi4vZGl2L3Jvd1wiO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBSb3dzRGl2IH0gZnJvbSBcIi4vZGl2L3Jvd3NcIjtcbmV4cG9ydCB7IGRlZmF1bHQgYXMgQ29sdW1uRGl2IH0gZnJvbSBcIi4vZGl2L2NvbHVtblwiO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBDb2x1bW5zRGl2IH0gZnJvbSBcIi4vZGl2L2NvbHVtbnNcIjtcbmV4cG9ydCB7IGRlZmF1bHQgYXMgU3BsaXR0ZXJEaXYgfSBmcm9tIFwiLi9kaXYvc3BsaXR0ZXJcIjtcbmV4cG9ydCB7IGRlZmF1bHQgYXMgU2l6ZWFibGVEaXYgfSBmcm9tIFwiLi9kaXYvc2l6ZWFibGVcIjtcbmV4cG9ydCB7IGRlZmF1bHQgYXMgU2l6ZWFibGVTZWN0aW9uIH0gZnJvbSBcIi4vc2VjdGlvbi9zaXplYWJsZVwiO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBWZXJ0aWNhbFNwbGl0dGVyRGl2IH0gZnJvbSBcIi4vZGl2L3NwbGl0dGVyL3ZlcnRpY2FsXCI7XG5leHBvcnQgeyBkZWZhdWx0IGFzIEhvcml6b250YWxTcGxpdHRlckRpdiB9IGZyb20gXCIuL2Rpdi9zcGxpdHRlci9ob3Jpem9udGFsXCI7XG4iXSwibmFtZXMiOlsiY3Vyc29yIiwiZGVmYXVsdCIsIlJvd0RpdiIsIlJvd3NEaXYiLCJDb2x1bW5EaXYiLCJDb2x1bW5zRGl2IiwiU3BsaXR0ZXJEaXYiLCJTaXplYWJsZURpdiIsIlNpemVhYmxlU2VjdGlvbiIsIlZlcnRpY2FsU3BsaXR0ZXJEaXYiLCJIb3Jpem9udGFsU3BsaXR0ZXJEaXYiXSwibWFwcGluZ3MiOiJBQUFBLFlBQVksQ0FBQzs7OzsrQkFFT0EsUUFBTTs7O3VCQUFqQkMsT0FBTzs7OytCQUVJQyxRQUFNOzs7b0JBQWpCRCxPQUFPOzs7K0JBQ0lFLFNBQU87OztxQkFBbEJGLE9BQU87OzsrQkFDSUcsV0FBUzs7O3VCQUFwQkgsT0FBTzs7OytCQUNJSSxZQUFVOzs7d0JBQXJCSixPQUFPOzs7K0JBQ0lLLGFBQVc7Ozt5QkFBdEJMLE9BQU87OzsrQkFDSU0sYUFBVzs7O3lCQUF0Qk4sT0FBTzs7OytCQUNJTyxpQkFBZTs7OzBCQUExQlAsT0FBTzs7OytCQUNJUSxxQkFBbUI7Ozt5QkFBOUJSLE9BQU87OzsrQkFDSVMsdUJBQXFCOzs7MkJBQWhDVCxPQUFPOzs7NkNBVmtCLFVBQVU7MENBRVYsV0FBVzsyQ0FDVixZQUFZOzZDQUNWLGNBQWM7OENBQ2IsZUFBZTsrQ0FDZCxnQkFBZ0I7K0NBQ2hCLGdCQUFnQjtnREFDWixvQkFBb0I7K0NBQ2hCLHlCQUF5QjtpREFDdkIsMkJBQTJCIn0=
|
package/lib/section/sizeable.js
CHANGED
|
@@ -27,7 +27,7 @@ function isNativeReflectConstruct() {
|
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function _construct(
|
|
30
|
+
function _construct(Parent1, args1, Class1) {
|
|
31
31
|
if (isNativeReflectConstruct()) {
|
|
32
32
|
_construct = Reflect.construct;
|
|
33
33
|
} else {
|
|
@@ -57,11 +57,11 @@ function _defineProperty(obj, key, value) {
|
|
|
57
57
|
}
|
|
58
58
|
return obj;
|
|
59
59
|
}
|
|
60
|
-
function _getPrototypeOf(
|
|
60
|
+
function _getPrototypeOf(o1) {
|
|
61
61
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
62
62
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
63
63
|
};
|
|
64
|
-
return _getPrototypeOf(
|
|
64
|
+
return _getPrototypeOf(o1);
|
|
65
65
|
}
|
|
66
66
|
function _inherits(subClass, superClass) {
|
|
67
67
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -90,12 +90,12 @@ function _possibleConstructorReturn(self, call) {
|
|
|
90
90
|
}
|
|
91
91
|
return _assertThisInitialized(self);
|
|
92
92
|
}
|
|
93
|
-
function _setPrototypeOf(
|
|
93
|
+
function _setPrototypeOf(o2, p1) {
|
|
94
94
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
95
95
|
o.__proto__ = p;
|
|
96
96
|
return o;
|
|
97
97
|
};
|
|
98
|
-
return _setPrototypeOf(
|
|
98
|
+
return _setPrototypeOf(o2, p1);
|
|
99
99
|
}
|
|
100
100
|
function _taggedTemplateLiteral(strings, raw) {
|
|
101
101
|
if (!raw) {
|
|
@@ -111,7 +111,7 @@ var _typeof = function(obj) {
|
|
|
111
111
|
"@swc/helpers - typeof";
|
|
112
112
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
113
113
|
};
|
|
114
|
-
function _wrapNativeSuper(
|
|
114
|
+
function _wrapNativeSuper(Class2) {
|
|
115
115
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
116
116
|
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
117
117
|
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
@@ -135,7 +135,7 @@ function _wrapNativeSuper(Class) {
|
|
|
135
135
|
});
|
|
136
136
|
return _setPrototypeOf(Wrapper, Class);
|
|
137
137
|
};
|
|
138
|
-
return _wrapNativeSuper(
|
|
138
|
+
return _wrapNativeSuper(Class2);
|
|
139
139
|
}
|
|
140
140
|
function _isNativeReflectConstruct() {
|
|
141
141
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-layout",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.5",
|
|
5
5
|
"license": "MIT, Anti-996",
|
|
6
6
|
"homepage": "https://github.com/djalbat/easy-layout",
|
|
7
7
|
"description": "Layout elements that work with CSS flexbox.",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"easy": "^13.0.41",
|
|
14
|
-
"easy-drag-and-drop": "^1.2.
|
|
15
|
-
"easy-with-style": "^3.0.
|
|
14
|
+
"easy-drag-and-drop": "^1.2.54",
|
|
15
|
+
"easy-with-style": "^3.0.132"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@swc/core": "^1.2.50",
|
package/src/constants.js
CHANGED
package/src/cursor.js
CHANGED
|
@@ -2,34 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
import { Body } from "easy";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { CURSOR } from "./constants";
|
|
6
|
+
import { AUTO_CURSOR, POINTER_CURSOR, COL_RESIZE_CURSOR, ROW_RESIZE_CURSOR } from "./cursors";
|
|
6
7
|
|
|
7
8
|
const body = new Body();
|
|
8
9
|
|
|
9
10
|
let previousCursor; ///
|
|
10
11
|
|
|
11
|
-
export function
|
|
12
|
+
export function resetCursor() {
|
|
13
|
+
setCursor(previousCursor); ///
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function pointerCursor() {
|
|
12
17
|
const currentCursor = getCurrentCursor();
|
|
13
18
|
|
|
14
|
-
if (currentCursor !==
|
|
15
|
-
previousCursor = currentCursor;
|
|
19
|
+
if (currentCursor !== POINTER_CURSOR) {
|
|
20
|
+
previousCursor = currentCursor; ///
|
|
16
21
|
|
|
17
|
-
setCursor(
|
|
22
|
+
setCursor(POINTER_CURSOR);
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
export function rowResizeCursor() {
|
|
22
27
|
const currentCursor = getCurrentCursor();
|
|
23
28
|
|
|
24
|
-
if (currentCursor !==
|
|
25
|
-
previousCursor = currentCursor;
|
|
29
|
+
if (currentCursor !== ROW_RESIZE_CURSOR) {
|
|
30
|
+
previousCursor = currentCursor; ///
|
|
26
31
|
|
|
27
|
-
setCursor(
|
|
32
|
+
setCursor(ROW_RESIZE_CURSOR);
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
export function
|
|
32
|
-
|
|
36
|
+
export function columnResizeCursor() {
|
|
37
|
+
const currentCursor = getCurrentCursor();
|
|
38
|
+
|
|
39
|
+
if (currentCursor !== COL_RESIZE_CURSOR) {
|
|
40
|
+
previousCursor = currentCursor; ///
|
|
41
|
+
|
|
42
|
+
setCursor(COL_RESIZE_CURSOR);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
resetCursor,
|
|
48
|
+
pointerCursor,
|
|
49
|
+
rowResizeCursor,
|
|
50
|
+
columnResizeCursor
|
|
33
51
|
}
|
|
34
52
|
|
|
35
53
|
function setCursor(cursor) {
|
|
@@ -41,7 +59,7 @@ function setCursor(cursor) {
|
|
|
41
59
|
}
|
|
42
60
|
|
|
43
61
|
function getCurrentCursor() {
|
|
44
|
-
const currentCursor = body.css(CURSOR) ||
|
|
62
|
+
const currentCursor = body.css(CURSOR) || AUTO_CURSOR;
|
|
45
63
|
|
|
46
64
|
return currentCursor;
|
|
47
65
|
}
|
package/src/cursors.js
ADDED
|
@@ -7,7 +7,7 @@ import Splitter from "../splitter";
|
|
|
7
7
|
import { rowResizeCursor } from "../../cursor";
|
|
8
8
|
|
|
9
9
|
class HorizontalSplitter extends Splitter {
|
|
10
|
-
|
|
10
|
+
setCursor() {
|
|
11
11
|
const disabled = this.isDisabled();
|
|
12
12
|
|
|
13
13
|
if (!disabled) {
|
|
@@ -15,6 +15,10 @@ class HorizontalSplitter extends Splitter {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
mouseOverHandler(event, element) {
|
|
19
|
+
this.setCursor();
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
startDragHandler(element) {
|
|
19
23
|
const disabled = this.isDisabled();
|
|
20
24
|
|
|
@@ -24,9 +28,9 @@ class HorizontalSplitter extends Splitter {
|
|
|
24
28
|
previousSizeableElementHeight = sizeableElementHeight; ///
|
|
25
29
|
|
|
26
30
|
this.setPreviousSizeableElementHeight(previousSizeableElementHeight);
|
|
27
|
-
|
|
28
|
-
rowResizeCursor();
|
|
29
31
|
}
|
|
32
|
+
|
|
33
|
+
this.setCursor();
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
dragHandler(relativeMouseTop, relativeMouseLeft) {
|
|
@@ -7,7 +7,7 @@ import Splitter from "../splitter";
|
|
|
7
7
|
import { columnResizeCursor } from "../../cursor";
|
|
8
8
|
|
|
9
9
|
class VerticalSplitter extends Splitter {
|
|
10
|
-
|
|
10
|
+
setCursor() {
|
|
11
11
|
const disabled = this.isDisabled();
|
|
12
12
|
|
|
13
13
|
if (!disabled) {
|
|
@@ -15,6 +15,10 @@ class VerticalSplitter extends Splitter {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
mouseOverHandler(event, element) {
|
|
19
|
+
this.setCursor();
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
startDragHandler(element) {
|
|
19
23
|
const disabled = this.isDisabled();
|
|
20
24
|
|
|
@@ -24,9 +28,9 @@ class VerticalSplitter extends Splitter {
|
|
|
24
28
|
previousSizeableElementWidth = sizeableElementWidth; ///
|
|
25
29
|
|
|
26
30
|
this.setPreviousSizeableElementWidth(previousSizeableElementWidth);
|
|
27
|
-
|
|
28
|
-
columnResizeCursor();
|
|
29
31
|
}
|
|
32
|
+
|
|
33
|
+
this.setCursor();
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
dragHandler(relativeMouseTop, relativeMouseLeft) {
|