mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fix ts iterations
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
* Change events trigger flow, so adding new events INSIDE event callback will work correctly.
|
||||||
* Fix double `dragend` trigger on `Konva.Transformer`
|
* Fix double `dragend` trigger on `Konva.Transformer`
|
||||||
|
|
||||||
## 7.1.3
|
## 7.1.3
|
||||||
|
@@ -2280,7 +2280,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_getListeners(eventType) {
|
_getProtoListeners(eventType) {
|
||||||
let listeners = this._cache.get(ALL_LISTENERS);
|
let listeners = this._cache.get(ALL_LISTENERS);
|
||||||
// if no cache for listeners, we need to pre calculate it
|
// if no cache for listeners, we need to pre calculate it
|
||||||
if (!listeners) {
|
if (!listeners) {
|
||||||
@@ -2309,7 +2309,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
|||||||
evt.currentTarget = this;
|
evt.currentTarget = this;
|
||||||
evt.type = eventType;
|
evt.type = eventType;
|
||||||
|
|
||||||
const topListeners = this._getListeners(eventType);
|
const topListeners = this._getProtoListeners(eventType);
|
||||||
if (topListeners) {
|
if (topListeners) {
|
||||||
for (var i = 0; i < topListeners.length; i++) {
|
for (var i = 0; i < topListeners.length; i++) {
|
||||||
topListeners[i].handler.call(this, evt);
|
topListeners[i].handler.call(this, evt);
|
||||||
|
@@ -18,6 +18,8 @@ import { IRect, RGB, RGBA, Vector2d } from './types';
|
|||||||
export class Collection<Child extends Node> {
|
export class Collection<Child extends Node> {
|
||||||
[index: number]: Child;
|
[index: number]: Child;
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
[Symbol.iterator](): Iterator<T>;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
length: number;
|
length: number;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
Reference in New Issue
Block a user