mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
fix types
This commit is contained in:
parent
39526cfce7
commit
b0a45caee4
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
|
||||
* 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
|
||||
* 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,
|
||||
* 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.
|
||||
@ -9818,8 +9818,8 @@
|
||||
* get/set image source. It can be image, canvas or video element
|
||||
* @name Konva.Image#image
|
||||
* @method
|
||||
* @param {Number} y
|
||||
* @returns {Number}
|
||||
* @param {Object} image source
|
||||
* @returns {Object}
|
||||
* @example
|
||||
* // get value
|
||||
* 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
|
||||
* 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
|
||||
* 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,
|
||||
* 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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Util, Collection } from './Util';
|
||||
import { Util, Collection, Point } from './Util';
|
||||
import { Container, ContainerConfig } from './Container';
|
||||
import { Node } from './Node';
|
||||
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.'
|
||||
);
|
||||
}
|
||||
getIntersection(pos, selector?) {
|
||||
getIntersection(pos: Point, selector?: string) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Util, Collection } from './Util';
|
||||
import { Util, Collection, Point } from './Util';
|
||||
import { Container } from './Container';
|
||||
import { Factory } from './Factory';
|
||||
import { BaseLayer } from './BaseLayer';
|
||||
@ -77,7 +77,7 @@ export class Layer extends BaseLayer {
|
||||
* // or if you interested in shape parent:
|
||||
* var group = layer.getIntersection({x: 50, y: 50}, 'Group');
|
||||
*/
|
||||
getIntersection(pos, selector) {
|
||||
getIntersection(pos: Point, selector?: string) {
|
||||
var obj, i, intersectionOffset, shape;
|
||||
|
||||
if (!this.hitGraphEnabled() || !this.isVisible()) {
|
||||
|
Loading…
Reference in New Issue
Block a user