|
@@ -547,6 +547,8 @@ var TimelineConsts = function TimelineConsts() {
|
|
timelineConsts_defineProperty(this, "doubleClickTimeoutMs", 400);
|
|
timelineConsts_defineProperty(this, "doubleClickTimeoutMs", 400);
|
|
|
|
|
|
timelineConsts_defineProperty(this, "scrollFinishedTimeoutMs", 500);
|
|
timelineConsts_defineProperty(this, "scrollFinishedTimeoutMs", 500);
|
|
|
|
+
|
|
|
|
+ timelineConsts_defineProperty(this, "autoPanByScrollPadding", 10);
|
|
};
|
|
};
|
|
// CONCATENATED MODULE: ./src/enums/timelineCursorType.ts
|
|
// CONCATENATED MODULE: ./src/enums/timelineCursorType.ts
|
|
var TimelineCursorType;
|
|
var TimelineCursorType;
|
|
@@ -1724,11 +1726,13 @@ var timeline_Timeline = /*#__PURE__*/function (_TimelineEventsEmitte) {
|
|
var y = pos.y;
|
|
var y = pos.y;
|
|
var isChanged = false;
|
|
var isChanged = false;
|
|
var speedX = 0;
|
|
var speedX = 0;
|
|
- var speedY = 0;
|
|
|
|
- var isLeft = x <= 0;
|
|
|
|
- var isRight = x >= this.canvas.clientWidth;
|
|
|
|
- var isTop = y <= 0;
|
|
|
|
- var isBottom = y >= this.canvas.clientHeight;
|
|
|
|
|
|
+ var speedY = 0; // Small offset to start auto pan earlier.
|
|
|
|
+
|
|
|
|
+ var bounds = this.consts.autoPanByScrollPadding;
|
|
|
|
+ var isLeft = x <= bounds;
|
|
|
|
+ var isRight = x >= this.canvas.clientWidth - bounds;
|
|
|
|
+ var isTop = y <= bounds;
|
|
|
|
+ var isBottom = y >= this.canvas.clientHeight - bounds;
|
|
var newWidth = null;
|
|
var newWidth = null;
|
|
var newHeight = null;
|
|
var newHeight = null;
|
|
|
|
|
|
@@ -1744,19 +1748,19 @@ var timeline_Timeline = /*#__PURE__*/function (_TimelineEventsEmitte) {
|
|
|
|
|
|
if (isLeft) {
|
|
if (isLeft) {
|
|
// Get normalized speed.
|
|
// Get normalized speed.
|
|
- speedX = -TimelineUtils.getDistance(x, 0) * scrollSpeedMultiplier;
|
|
|
|
|
|
+ speedX = -TimelineUtils.getDistance(x, bounds) * scrollSpeedMultiplier;
|
|
} else if (isRight) {
|
|
} else if (isRight) {
|
|
// Get normalized speed:
|
|
// Get normalized speed:
|
|
- speedX = TimelineUtils.getDistance(x, this.canvas.clientWidth) * scrollSpeedMultiplier;
|
|
|
|
|
|
+ speedX = TimelineUtils.getDistance(x, this.canvas.clientWidth - bounds) * scrollSpeedMultiplier;
|
|
newWidth = this.scrollContainer.scrollLeft + this.canvas.clientWidth + speedX;
|
|
newWidth = this.scrollContainer.scrollLeft + this.canvas.clientWidth + speedX;
|
|
}
|
|
}
|
|
|
|
|
|
if (isTop) {
|
|
if (isTop) {
|
|
// Get normalized speed.
|
|
// Get normalized speed.
|
|
- speedY = -TimelineUtils.getDistance(x, 0) * scrollSpeedMultiplier / 4;
|
|
|
|
|
|
+ speedY = -TimelineUtils.getDistance(x, bounds) * scrollSpeedMultiplier / 4;
|
|
} else if (isBottom) {
|
|
} else if (isBottom) {
|
|
// Get normalized speed:
|
|
// Get normalized speed:
|
|
- speedY = TimelineUtils.getDistance(x, this.canvas.clientHeight) * scrollSpeedMultiplier / 4;
|
|
|
|
|
|
+ speedY = TimelineUtils.getDistance(x, this.canvas.clientHeight - bounds) * scrollSpeedMultiplier / 4;
|
|
newHeight = this.scrollContainer.scrollTop + this.canvas.clientHeight;
|
|
newHeight = this.scrollContainer.scrollTop + this.canvas.clientHeight;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|