jsuites 4.11.6 → 4.12.1

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.
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.11.6';
20
+ var version = '4.12.0';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -73,6 +73,7 @@ var jSuites = function(options) {
73
73
  h: rect.height,
74
74
  d: item.style.cursor,
75
75
  resizing: item.style.cursor ? true : false,
76
+ actioned: false,
76
77
  }
77
78
 
78
79
  // Make sure width and height styling is OK
@@ -130,7 +131,7 @@ var jSuites = function(options) {
130
131
 
131
132
  var editorMouseUp = function(e) {
132
133
  if (editorAction && editorAction.e) {
133
- if (typeof(editorAction.e.refresh) == 'function') {
134
+ if (typeof(editorAction.e.refresh) == 'function' && state.actioned) {
134
135
  editorAction.e.refresh();
135
136
  }
136
137
  editorAction.e.style.cursor = '';
@@ -173,6 +174,7 @@ var jSuites = function(options) {
173
174
 
174
175
  // Update element
175
176
  if (typeof(editorAction.e.refresh) == 'function') {
177
+ state.actioned = true;
176
178
  editorAction.e.refresh('position', top, left);
177
179
  }
178
180
  } else {
@@ -203,6 +205,7 @@ var jSuites = function(options) {
203
205
 
204
206
  // Update element
205
207
  if (typeof(editorAction.e.refresh) == 'function') {
208
+ state.actioned = true;
206
209
  editorAction.e.refresh('dimensions', width, height);
207
210
  }
208
211
  }
@@ -2936,8 +2939,13 @@ jSuites.contextmenu = (function(el, options) {
2936
2939
  // Coordinates
2937
2940
  if ((obj.options.items && obj.options.items.length > 0) || el.children.length) {
2938
2941
  if (e.target) {
2939
- var x = e.clientX;
2940
- var y = e.clientY;
2942
+ if (e.changedTouches && e.changedTouches[0]) {
2943
+ x = e.changedTouches[0].clientX;
2944
+ y = e.changedTouches[0].clientY;
2945
+ } else {
2946
+ var x = e.clientX;
2947
+ var y = e.clientY;
2948
+ }
2941
2949
  } else {
2942
2950
  var x = e.x;
2943
2951
  var y = e.y;
@@ -2967,6 +2975,10 @@ jSuites.contextmenu = (function(el, options) {
2967
2975
  }
2968
2976
  }
2969
2977
 
2978
+ obj.isOpened = function() {
2979
+ return el.classList.contains('jcontextmenu-focus') ? true : false;
2980
+ }
2981
+
2970
2982
  /**
2971
2983
  * Close menu
2972
2984
  */
package/dist/jsuites.css CHANGED
@@ -1689,38 +1689,61 @@ div[data-before]:before {
1689
1689
  left:50%;
1690
1690
  width:60%;
1691
1691
  height:60%;
1692
- -webkit-box-shadow: 0 2px 10px rgba(0,0,0,.2);
1693
- -moz-box-shadow: 0 2px 10px rgba(0,0,0,.2);
1692
+ -webkit-box-shadow: 0 2px 12px rgba(0,0,0,.2);
1693
+ -moz-box-shadow: 0 2px 12px rgba(0,0,0,.2);
1694
1694
  border:1px solid #ccc;
1695
1695
  background-color:#fff;
1696
1696
  transform: translate(-50%, -50%);
1697
1697
  box-sizing: border-box;
1698
- padding-top:50px !important;
1698
+ padding-top: 50px !important;
1699
1699
  z-index:9002;
1700
- border-radius: 8px;
1700
+ border-radius: 4px;
1701
1701
  }
1702
1702
 
1703
1703
  .jmodal:before {
1704
- position:absolute;
1705
- top:0;
1706
- left:0;
1707
- width:100%;
1704
+ position: absolute;
1705
+ top: 0;
1706
+ left: 0;
1707
+ width: 100%;
1708
1708
  content:attr(title);
1709
- padding:15px;
1709
+ padding: 25px;
1710
+ padding-bottom: 20px;
1710
1711
  box-sizing: border-box;
1711
- font-size:1.2em;
1712
- box-shadow: 1px 1px 3px rgba(0,0,0,.2);
1712
+ font-size: 1.4em;
1713
1713
  background-color: #fff;
1714
1714
  border-radius: 8px 8px 0px 0px;
1715
1715
  }
1716
1716
 
1717
1717
  .jmodal_content {
1718
- padding:20px;
1719
- overflow-y:auto;
1720
- max-height:100%;
1718
+ padding: 22px;
1719
+ overflow-y: auto;
1720
+ max-height: 100%;
1721
1721
  box-sizing: border-box;
1722
1722
  height: -webkit-fill-available;
1723
+
1724
+ scrollbar-width: thin;
1725
+ scrollbar-color: #333 transparent;
1726
+ }
1727
+
1728
+ .jmodal_content::-webkit-scrollbar {
1729
+ height: 12px;
1730
+ }
1731
+
1732
+ .jmodal_content::-webkit-scrollbar {
1733
+ width: 12px;
1734
+ }
1735
+
1736
+ .jmodal_content::-webkit-scrollbar-track {
1737
+ border: 1px solid #fff;
1738
+ background: #eee;
1739
+ }
1740
+
1741
+ .jmodal_content::-webkit-scrollbar-thumb {
1742
+ border: 1px solid #fff;
1743
+ background: #888;
1723
1744
  }
1745
+
1746
+
1724
1747
  .jmodal.no-title {
1725
1748
  padding-top: initial !important;
1726
1749
  }
@@ -1730,16 +1753,16 @@ div[data-before]:before {
1730
1753
  }
1731
1754
 
1732
1755
  .jmodal:after {
1733
- content:'';
1756
+ content: '';
1734
1757
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
1735
- position:absolute;
1736
- top:0;
1737
- right:0;
1738
- margin:14px;
1739
- font-size:24px;
1740
- width:24px;
1741
- height:24px;
1742
- cursor:pointer;
1758
+ position: absolute;
1759
+ top: 0;
1760
+ right: 0;
1761
+ margin: 25px;
1762
+ font-size: 24px;
1763
+ width: 24px;
1764
+ height: 24px;
1765
+ cursor: pointer;
1743
1766
  text-shadow: 0px 0px 5px #fff;
1744
1767
  }
1745
1768
 
package/dist/jsuites.js CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.11.6';
20
+ var version = '4.12.0';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -73,6 +73,7 @@ var jSuites = function(options) {
73
73
  h: rect.height,
74
74
  d: item.style.cursor,
75
75
  resizing: item.style.cursor ? true : false,
76
+ actioned: false,
76
77
  }
77
78
 
78
79
  // Make sure width and height styling is OK
@@ -130,7 +131,7 @@ var jSuites = function(options) {
130
131
 
131
132
  var editorMouseUp = function(e) {
132
133
  if (editorAction && editorAction.e) {
133
- if (typeof(editorAction.e.refresh) == 'function') {
134
+ if (typeof(editorAction.e.refresh) == 'function' && state.actioned) {
134
135
  editorAction.e.refresh();
135
136
  }
136
137
  editorAction.e.style.cursor = '';
@@ -173,6 +174,7 @@ var jSuites = function(options) {
173
174
 
174
175
  // Update element
175
176
  if (typeof(editorAction.e.refresh) == 'function') {
177
+ state.actioned = true;
176
178
  editorAction.e.refresh('position', top, left);
177
179
  }
178
180
  } else {
@@ -203,6 +205,7 @@ var jSuites = function(options) {
203
205
 
204
206
  // Update element
205
207
  if (typeof(editorAction.e.refresh) == 'function') {
208
+ state.actioned = true;
206
209
  editorAction.e.refresh('dimensions', width, height);
207
210
  }
208
211
  }
@@ -2947,8 +2950,13 @@ jSuites.contextmenu = (function(el, options) {
2947
2950
  // Coordinates
2948
2951
  if ((obj.options.items && obj.options.items.length > 0) || el.children.length) {
2949
2952
  if (e.target) {
2950
- var x = e.clientX;
2951
- var y = e.clientY;
2953
+ if (e.changedTouches && e.changedTouches[0]) {
2954
+ x = e.changedTouches[0].clientX;
2955
+ y = e.changedTouches[0].clientY;
2956
+ } else {
2957
+ var x = e.clientX;
2958
+ var y = e.clientY;
2959
+ }
2952
2960
  } else {
2953
2961
  var x = e.x;
2954
2962
  var y = e.y;
@@ -2978,6 +2986,10 @@ jSuites.contextmenu = (function(el, options) {
2978
2986
  }
2979
2987
  }
2980
2988
 
2989
+ obj.isOpened = function() {
2990
+ return el.classList.contains('jcontextmenu-focus') ? true : false;
2991
+ }
2992
+
2981
2993
  /**
2982
2994
  * Close menu
2983
2995
  */
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "javascript plugins"
20
20
  ],
21
21
  "main": "dist/jsuites.js",
22
- "version": "4.11.6",
22
+ "version": "4.12.1",
23
23
  "bugs": "https://github.com/jsuites/jsuites/issues",
24
24
  "homepage": "https://github.com/jsuites/jsuites",
25
25
  "docs": "https://jsuites.net",