@websy/websy-designs 1.7.16 → 1.7.18
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/dist/websy-designs-es6.debug.js +24 -11
- package/dist/websy-designs-es6.js +28 -17
- package/dist/websy-designs-es6.min.js +1 -1
- package/dist/websy-designs.debug.js +24 -11
- package/dist/websy-designs.js +28 -17
- package/dist/websy-designs.min.js +1 -1
- package/package.json +1 -1
- package/dist/server/helpers/v1/puppeteer-report/examples/package-lock.json +0 -972
|
@@ -7024,11 +7024,20 @@ class WebsyTable3 {
|
|
|
7024
7024
|
event.preventDefault()
|
|
7025
7025
|
// console.log('scrollwheel', event)
|
|
7026
7026
|
if (Math.abs(event.deltaX) > Math.abs(event.deltaY)) {
|
|
7027
|
-
this.scrollX(Math.max(-
|
|
7027
|
+
this.scrollX(Math.max(-2, Math.min(2, event.deltaX)))
|
|
7028
7028
|
}
|
|
7029
7029
|
else {
|
|
7030
|
-
console.log('delta', event.deltaY)
|
|
7031
|
-
|
|
7030
|
+
// console.log('delta', event.deltaY)
|
|
7031
|
+
// force the scroll to be a single row at a time
|
|
7032
|
+
const scrollHandleEl = document.getElementById(`${this.elementId}_vScrollHandle`)
|
|
7033
|
+
const scrollContainerEl = document.getElementById(`${this.elementId}_vScrollContainer`)
|
|
7034
|
+
let resolvedDelta = (scrollContainerEl.getBoundingClientRect().height - scrollHandleEl.getBoundingClientRect().height) / this.totalRowCount
|
|
7035
|
+
if (event.deltaY < 0) {
|
|
7036
|
+
resolvedDelta = resolvedDelta * -1
|
|
7037
|
+
}
|
|
7038
|
+
// console.log('resolvedDelta', resolvedDelta)
|
|
7039
|
+
// this.scrollY(Math.max(-2, Math.min(2, event.deltaY)))
|
|
7040
|
+
this.scrollY(resolvedDelta)
|
|
7032
7041
|
}
|
|
7033
7042
|
}
|
|
7034
7043
|
else if (this.options.onNativeScroll) {
|
|
@@ -7037,7 +7046,7 @@ class WebsyTable3 {
|
|
|
7037
7046
|
}
|
|
7038
7047
|
}
|
|
7039
7048
|
handleTouchEnd (event) {
|
|
7040
|
-
console.log('touch end fired')
|
|
7049
|
+
// console.log('touch end fired')
|
|
7041
7050
|
if (typeof event.targetTouches !== 'undefined') {
|
|
7042
7051
|
this.isTouchScrolling = false
|
|
7043
7052
|
this.touchEndTime = (new Date()).getTime()
|
|
@@ -7049,7 +7058,7 @@ class WebsyTable3 {
|
|
|
7049
7058
|
}
|
|
7050
7059
|
}
|
|
7051
7060
|
handleTouchMove (event) {
|
|
7052
|
-
console.log(event.target.classList)
|
|
7061
|
+
// console.log(event.target.classList)
|
|
7053
7062
|
if (this.isTouchScrolling === true) {
|
|
7054
7063
|
event.preventDefault()
|
|
7055
7064
|
event.stopPropagation()
|
|
@@ -7071,7 +7080,7 @@ class WebsyTable3 {
|
|
|
7071
7080
|
// else {
|
|
7072
7081
|
// this.isTouchScrolling = false
|
|
7073
7082
|
// }
|
|
7074
|
-
console.log('delta', this.mouseYStart, event.targetTouches[0].pageY, deltaY)
|
|
7083
|
+
// console.log('delta', this.mouseYStart, event.targetTouches[0].pageY, deltaY)
|
|
7075
7084
|
// deltaX = deltaX * (scrollHandleXEl.offsetWidth / this.sizes.scrollableWidth)
|
|
7076
7085
|
// deltaY = deltaY * (scrollHandleYEl.offsetHeight / this.sizes.bodyHeight)
|
|
7077
7086
|
// console.log('delta', deltaY)
|
|
@@ -7105,7 +7114,7 @@ class WebsyTable3 {
|
|
|
7105
7114
|
if (event.target.classList.contains('websy-table-cell-collapse')) {
|
|
7106
7115
|
return
|
|
7107
7116
|
}
|
|
7108
|
-
console.log(event.target.classList)
|
|
7117
|
+
// console.log(event.target.classList)
|
|
7109
7118
|
if (this.options.virtualScroll === true) {
|
|
7110
7119
|
this.touchStartTime = (new Date()).getTime()
|
|
7111
7120
|
this.isTouchScrolling = true
|
|
@@ -7340,6 +7349,9 @@ class WebsyTable3 {
|
|
|
7340
7349
|
}
|
|
7341
7350
|
scrollY (diff) {
|
|
7342
7351
|
const el = document.getElementById(`${this.elementId}_tableContainer`)
|
|
7352
|
+
if (this.vScrollRequired === false) {
|
|
7353
|
+
return
|
|
7354
|
+
}
|
|
7343
7355
|
if (!el.classList.contains('scrolling')) {
|
|
7344
7356
|
el.classList.add('scrolling')
|
|
7345
7357
|
}
|
|
@@ -7349,9 +7361,10 @@ class WebsyTable3 {
|
|
|
7349
7361
|
this.scrollTimeoutFn = setTimeout(() => {
|
|
7350
7362
|
el.classList.remove('scrolling')
|
|
7351
7363
|
}, 200)
|
|
7352
|
-
if (this.vScrollRequired === false) {
|
|
7353
|
-
|
|
7354
|
-
}
|
|
7364
|
+
// if (this.vScrollRequired === false) {
|
|
7365
|
+
// return
|
|
7366
|
+
// }
|
|
7367
|
+
// console.log('this.handleYStart', this.handleYStart)
|
|
7355
7368
|
const scrollContainerEl = document.getElementById(`${this.elementId}_vScrollContainer`)
|
|
7356
7369
|
const scrollHandleEl = document.getElementById(`${this.elementId}_vScrollHandle`)
|
|
7357
7370
|
let handlePos
|
|
@@ -7360,7 +7373,7 @@ class WebsyTable3 {
|
|
|
7360
7373
|
}
|
|
7361
7374
|
else {
|
|
7362
7375
|
// console.log('appending not resetting')
|
|
7363
|
-
handlePos = scrollHandleEl.
|
|
7376
|
+
handlePos = +scrollHandleEl.style.top.replace('px', '') + diff
|
|
7364
7377
|
}
|
|
7365
7378
|
const scrollableSpace = scrollContainerEl.getBoundingClientRect().height - scrollHandleEl.getBoundingClientRect().height
|
|
7366
7379
|
// console.log('dragging y', (diff), scrollContainerEl.getBoundingClientRect().height - scrollHandleEl.getBoundingClientRect().height)
|
package/dist/websy-designs.js
CHANGED
|
@@ -7700,10 +7700,21 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7700
7700
|
event.preventDefault(); // console.log('scrollwheel', event)
|
|
7701
7701
|
|
|
7702
7702
|
if (Math.abs(event.deltaX) > Math.abs(event.deltaY)) {
|
|
7703
|
-
this.scrollX(Math.max(-
|
|
7703
|
+
this.scrollX(Math.max(-2, Math.min(2, event.deltaX)));
|
|
7704
7704
|
} else {
|
|
7705
|
-
console.log('delta', event.deltaY)
|
|
7706
|
-
|
|
7705
|
+
// console.log('delta', event.deltaY)
|
|
7706
|
+
// force the scroll to be a single row at a time
|
|
7707
|
+
var scrollHandleEl = document.getElementById("".concat(this.elementId, "_vScrollHandle"));
|
|
7708
|
+
var scrollContainerEl = document.getElementById("".concat(this.elementId, "_vScrollContainer"));
|
|
7709
|
+
var resolvedDelta = (scrollContainerEl.getBoundingClientRect().height - scrollHandleEl.getBoundingClientRect().height) / this.totalRowCount;
|
|
7710
|
+
|
|
7711
|
+
if (event.deltaY < 0) {
|
|
7712
|
+
resolvedDelta = resolvedDelta * -1;
|
|
7713
|
+
} // console.log('resolvedDelta', resolvedDelta)
|
|
7714
|
+
// this.scrollY(Math.max(-2, Math.min(2, event.deltaY)))
|
|
7715
|
+
|
|
7716
|
+
|
|
7717
|
+
this.scrollY(resolvedDelta);
|
|
7707
7718
|
}
|
|
7708
7719
|
} else if (this.options.onNativeScroll) {
|
|
7709
7720
|
var el = document.getElementById("".concat(this.elementId, "_tableBody"));
|
|
@@ -7713,8 +7724,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7713
7724
|
}, {
|
|
7714
7725
|
key: "handleTouchEnd",
|
|
7715
7726
|
value: function handleTouchEnd(event) {
|
|
7716
|
-
console.log('touch end fired')
|
|
7717
|
-
|
|
7727
|
+
// console.log('touch end fired')
|
|
7718
7728
|
if (typeof event.targetTouches !== 'undefined') {
|
|
7719
7729
|
this.isTouchScrolling = false;
|
|
7720
7730
|
this.touchEndTime = new Date().getTime();
|
|
@@ -7727,8 +7737,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7727
7737
|
}, {
|
|
7728
7738
|
key: "handleTouchMove",
|
|
7729
7739
|
value: function handleTouchMove(event) {
|
|
7730
|
-
console.log(event.target.classList)
|
|
7731
|
-
|
|
7740
|
+
// console.log(event.target.classList)
|
|
7732
7741
|
if (this.isTouchScrolling === true) {
|
|
7733
7742
|
event.preventDefault();
|
|
7734
7743
|
event.stopPropagation();
|
|
@@ -7750,8 +7759,8 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7750
7759
|
// else {
|
|
7751
7760
|
// this.isTouchScrolling = false
|
|
7752
7761
|
// }
|
|
7753
|
-
|
|
7754
|
-
|
|
7762
|
+
// console.log('delta', this.mouseYStart, event.targetTouches[0].pageY, deltaY)
|
|
7763
|
+
// deltaX = deltaX * (scrollHandleXEl.offsetWidth / this.sizes.scrollableWidth)
|
|
7755
7764
|
// deltaY = deltaY * (scrollHandleYEl.offsetHeight / this.sizes.bodyHeight)
|
|
7756
7765
|
// console.log('delta', deltaY)
|
|
7757
7766
|
// NW
|
|
@@ -7786,9 +7795,8 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7786
7795
|
|
|
7787
7796
|
if (event.target.classList.contains('websy-table-cell-collapse')) {
|
|
7788
7797
|
return;
|
|
7789
|
-
}
|
|
7798
|
+
} // console.log(event.target.classList)
|
|
7790
7799
|
|
|
7791
|
-
console.log(event.target.classList);
|
|
7792
7800
|
|
|
7793
7801
|
if (this.options.virtualScroll === true) {
|
|
7794
7802
|
this.touchStartTime = new Date().getTime();
|
|
@@ -8094,6 +8102,10 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
8094
8102
|
value: function scrollY(diff) {
|
|
8095
8103
|
var el = document.getElementById("".concat(this.elementId, "_tableContainer"));
|
|
8096
8104
|
|
|
8105
|
+
if (this.vScrollRequired === false) {
|
|
8106
|
+
return;
|
|
8107
|
+
}
|
|
8108
|
+
|
|
8097
8109
|
if (!el.classList.contains('scrolling')) {
|
|
8098
8110
|
el.classList.add('scrolling');
|
|
8099
8111
|
}
|
|
@@ -8104,11 +8116,10 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
8104
8116
|
|
|
8105
8117
|
this.scrollTimeoutFn = setTimeout(function () {
|
|
8106
8118
|
el.classList.remove('scrolling');
|
|
8107
|
-
}, 200);
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
}
|
|
8119
|
+
}, 200); // if (this.vScrollRequired === false) {
|
|
8120
|
+
// return
|
|
8121
|
+
// }
|
|
8122
|
+
// console.log('this.handleYStart', this.handleYStart)
|
|
8112
8123
|
|
|
8113
8124
|
var scrollContainerEl = document.getElementById("".concat(this.elementId, "_vScrollContainer"));
|
|
8114
8125
|
var scrollHandleEl = document.getElementById("".concat(this.elementId, "_vScrollHandle"));
|
|
@@ -8118,7 +8129,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
8118
8129
|
handlePos = this.handleYStart + diff;
|
|
8119
8130
|
} else {
|
|
8120
8131
|
// console.log('appending not resetting')
|
|
8121
|
-
handlePos = scrollHandleEl.
|
|
8132
|
+
handlePos = +scrollHandleEl.style.top.replace('px', '') + diff;
|
|
8122
8133
|
}
|
|
8123
8134
|
|
|
8124
8135
|
var scrollableSpace = scrollContainerEl.getBoundingClientRect().height - scrollHandleEl.getBoundingClientRect().height; // console.log('dragging y', (diff), scrollContainerEl.getBoundingClientRect().height - scrollHandleEl.getBoundingClientRect().height)
|