mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
update CHANGELOG with new version
This commit is contained in:
parent
035ab99cb4
commit
bdfa9f2225
@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 7.0.2 - 2020-06-30
|
||||
|
||||
* Fix wrong trigger `dbltap` and `click` on mobile
|
||||
|
||||
## 7.0.1 - 2020-06-29
|
||||
|
||||
* Fixes for different font families support.
|
||||
|
13
konva.js
13
konva.js
@ -8,7 +8,7 @@
|
||||
* Konva JavaScript Framework v7.0.1
|
||||
* http://konvajs.org/
|
||||
* Licensed under the MIT
|
||||
* Date: Mon Jun 29 2020
|
||||
* Date: Tue Jun 30 2020
|
||||
*
|
||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
||||
@ -6422,7 +6422,7 @@
|
||||
Stage.prototype._touchend = function (evt) {
|
||||
var _this = this;
|
||||
this.setPointersPositions(evt);
|
||||
var clickEndShape = this.clickEndShape, fireDblClick = false;
|
||||
var tapEndShape = this.tapEndShape, fireDblClick = false;
|
||||
if (Konva.inDblClickWindow) {
|
||||
fireDblClick = true;
|
||||
clearTimeout(this.dblTimeout);
|
||||
@ -6453,14 +6453,14 @@
|
||||
return;
|
||||
}
|
||||
processedShapesIds[shape._id] = true;
|
||||
_this.clickEndShape = shape;
|
||||
_this.tapEndShape = shape;
|
||||
shape._fireAndBubble(TOUCHEND, { evt: evt, pointerId: pos.id });
|
||||
triggeredOnShape = true;
|
||||
// detect if tap or double tap occurred
|
||||
if (Konva.listenClickTap && shape === _this.tapStartShape) {
|
||||
tapTriggered = true;
|
||||
shape._fireAndBubble(TAP, { evt: evt, pointerId: pos.id });
|
||||
if (fireDblClick && clickEndShape && clickEndShape === shape) {
|
||||
if (fireDblClick && tapEndShape && tapEndShape === shape) {
|
||||
dblTapTriggered = true;
|
||||
shape._fireAndBubble(DBL_TAP, { evt: evt, pointerId: pos.id });
|
||||
}
|
||||
@ -6479,7 +6479,7 @@
|
||||
});
|
||||
}
|
||||
if (Konva.listenClickTap && !tapTriggered) {
|
||||
this.clickEndShape = null;
|
||||
this.tapEndShape = null;
|
||||
this._fire(TAP, {
|
||||
evt: evt,
|
||||
target: this,
|
||||
@ -6503,6 +6503,9 @@
|
||||
this._fire(CONTENT_DBL_TAP, { evt: evt });
|
||||
}
|
||||
}
|
||||
if (this.preventDefault() && evt.cancelable) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
Konva.listenClickTap = false;
|
||||
};
|
||||
Stage.prototype._wheel = function (evt) {
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
15
src/Stage.ts
15
src/Stage.ts
@ -135,8 +135,9 @@ export class Stage extends Container<Layer> {
|
||||
targetShape: Shape;
|
||||
clickStartShape: Shape;
|
||||
clickEndShape: Shape;
|
||||
dblTimeout: any;
|
||||
tapStartShape: Shape;
|
||||
tapEndShape: Shape;
|
||||
dblTimeout: any;
|
||||
|
||||
constructor(config: StageConfig) {
|
||||
super(checkNoClip(config));
|
||||
@ -747,7 +748,7 @@ export class Stage extends Container<Layer> {
|
||||
_touchend(evt) {
|
||||
this.setPointersPositions(evt);
|
||||
|
||||
var clickEndShape = this.clickEndShape,
|
||||
var tapEndShape = this.tapEndShape,
|
||||
fireDblClick = false;
|
||||
|
||||
if (Konva.inDblClickWindow) {
|
||||
@ -786,7 +787,7 @@ export class Stage extends Container<Layer> {
|
||||
}
|
||||
processedShapesIds[shape._id] = true;
|
||||
|
||||
this.clickEndShape = shape;
|
||||
this.tapEndShape = shape;
|
||||
shape._fireAndBubble(TOUCHEND, { evt: evt, pointerId: pos.id });
|
||||
triggeredOnShape = true;
|
||||
|
||||
@ -795,7 +796,7 @@ export class Stage extends Container<Layer> {
|
||||
tapTriggered = true;
|
||||
shape._fireAndBubble(TAP, { evt: evt, pointerId: pos.id });
|
||||
|
||||
if (fireDblClick && clickEndShape && clickEndShape === shape) {
|
||||
if (fireDblClick && tapEndShape && tapEndShape === shape) {
|
||||
dblTapTriggered = true;
|
||||
shape._fireAndBubble(DBL_TAP, { evt: evt, pointerId: pos.id });
|
||||
}
|
||||
@ -817,7 +818,7 @@ export class Stage extends Container<Layer> {
|
||||
}
|
||||
|
||||
if (Konva.listenClickTap && !tapTriggered) {
|
||||
this.clickEndShape = null;
|
||||
this.tapEndShape = null;
|
||||
this._fire(TAP, {
|
||||
evt: evt,
|
||||
target: this,
|
||||
@ -842,6 +843,10 @@ export class Stage extends Container<Layer> {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.preventDefault() && evt.cancelable) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
|
||||
Konva.listenClickTap = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user