mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 13:26:07 +08:00
fix types
This commit is contained in:
6
konva.js
6
konva.js
@@ -2095,7 +2095,7 @@
|
|||||||
* @param {Function} func function executed on each animation frame. The function is passed a frame object, which contains
|
* @param {Function} func function executed on each animation frame. The function is passed a frame object, which contains
|
||||||
* timeDiff, lastTime, time, and frameRate properties. The timeDiff property is the number of milliseconds that have passed
|
* timeDiff, lastTime, time, and frameRate properties. The timeDiff property is the number of milliseconds that have passed
|
||||||
* since the last animation frame. The lastTime property is time in milliseconds that elapsed from the moment the animation started
|
* since the last animation frame. The lastTime property is time in milliseconds that elapsed from the moment the animation started
|
||||||
* to the last animation frame. The time property is the time in milliseconds that ellapsed from the moment the animation started
|
* to the last animation frame. The time property is the time in milliseconds that elapsed from the moment the animation started
|
||||||
* to the current animation frame. The frameRate property is the current frame rate in frames / second. Return false from function,
|
* to the current animation frame. The frameRate property is the current frame rate in frames / second. Return false from function,
|
||||||
* if you don't need to redraw layer/layers on some frames.
|
* if you don't need to redraw layer/layers on some frames.
|
||||||
* @param {Konva.Layer|Array} [layers] layer(s) to be redrawn on each animation frame. Can be a layer, an array of layers, or null.
|
* @param {Konva.Layer|Array} [layers] layer(s) to be redrawn on each animation frame. Can be a layer, an array of layers, or null.
|
||||||
@@ -9818,8 +9818,8 @@
|
|||||||
* get/set image source. It can be image, canvas or video element
|
* get/set image source. It can be image, canvas or video element
|
||||||
* @name Konva.Image#image
|
* @name Konva.Image#image
|
||||||
* @method
|
* @method
|
||||||
* @param {Number} y
|
* @param {Object} image source
|
||||||
* @returns {Number}
|
* @returns {Object}
|
||||||
* @example
|
* @example
|
||||||
* // get value
|
* // get value
|
||||||
* var image = shape.image();
|
* var image = shape.image();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ var now = (function() {
|
|||||||
* @param {Function} func function executed on each animation frame. The function is passed a frame object, which contains
|
* @param {Function} func function executed on each animation frame. The function is passed a frame object, which contains
|
||||||
* timeDiff, lastTime, time, and frameRate properties. The timeDiff property is the number of milliseconds that have passed
|
* timeDiff, lastTime, time, and frameRate properties. The timeDiff property is the number of milliseconds that have passed
|
||||||
* since the last animation frame. The lastTime property is time in milliseconds that elapsed from the moment the animation started
|
* since the last animation frame. The lastTime property is time in milliseconds that elapsed from the moment the animation started
|
||||||
* to the last animation frame. The time property is the time in milliseconds that ellapsed from the moment the animation started
|
* to the last animation frame. The time property is the time in milliseconds that elapsed from the moment the animation started
|
||||||
* to the current animation frame. The frameRate property is the current frame rate in frames / second. Return false from function,
|
* to the current animation frame. The frameRate property is the current frame rate in frames / second. Return false from function,
|
||||||
* if you don't need to redraw layer/layers on some frames.
|
* if you don't need to redraw layer/layers on some frames.
|
||||||
* @param {Konva.Layer|Array} [layers] layer(s) to be redrawn on each animation frame. Can be a layer, an array of layers, or null.
|
* @param {Konva.Layer|Array} [layers] layer(s) to be redrawn on each animation frame. Can be a layer, an array of layers, or null.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Util, Collection } from './Util';
|
import { Util, Collection, Point } from './Util';
|
||||||
import { Container, ContainerConfig } from './Container';
|
import { Container, ContainerConfig } from './Container';
|
||||||
import { Node } from './Node';
|
import { Node } from './Node';
|
||||||
import { Factory } from './Factory';
|
import { Factory } from './Factory';
|
||||||
@@ -252,7 +252,7 @@ export abstract class BaseLayer extends Container<Group | Shape> {
|
|||||||
'Can not change height of layer. Use "stage.height(value)" function instead.'
|
'Can not change height of layer. Use "stage.height(value)" function instead.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
getIntersection(pos, selector?) {
|
getIntersection(pos: Point, selector?: string) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Util, Collection } from './Util';
|
import { Util, Collection, Point } from './Util';
|
||||||
import { Container } from './Container';
|
import { Container } from './Container';
|
||||||
import { Factory } from './Factory';
|
import { Factory } from './Factory';
|
||||||
import { BaseLayer } from './BaseLayer';
|
import { BaseLayer } from './BaseLayer';
|
||||||
@@ -77,7 +77,7 @@ export class Layer extends BaseLayer {
|
|||||||
* // or if you interested in shape parent:
|
* // or if you interested in shape parent:
|
||||||
* var group = layer.getIntersection({x: 50, y: 50}, 'Group');
|
* var group = layer.getIntersection({x: 50, y: 50}, 'Group');
|
||||||
*/
|
*/
|
||||||
getIntersection(pos, selector) {
|
getIntersection(pos: Point, selector?: string) {
|
||||||
var obj, i, intersectionOffset, shape;
|
var obj, i, intersectionOffset, shape;
|
||||||
|
|
||||||
if (!this.hitGraphEnabled() || !this.isVisible()) {
|
if (!this.hitGraphEnabled() || !this.isVisible()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user