From 28700e1904f98f678114d466a47b0a18ff38e552 Mon Sep 17 00:00:00 2001 From: Evan Patterson Date: Thu, 12 Sep 2019 16:13:37 -0700 Subject: [PATCH] Selector parameter in findAncestor(s) is not optional --- src/Node.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Node.ts b/src/Node.ts index 868d3e8e..5303e432 100644 --- a/src/Node.ts +++ b/src/Node.ts @@ -1489,7 +1489,7 @@ export abstract class Node { * get all ancestors (parent then parent of the parent, etc) of the node * @method * @name Konva.Node#findAncestors - * @param {String} [selector] selector for search + * @param {String} selector selector for search * @param {Boolean} [includeSelf] show we think that node is ancestro itself? * @param {Konva.Node} [stopNode] optional node where we need to stop searching (one of ancestors) * @returns {Array} [ancestors] @@ -1497,7 +1497,7 @@ export abstract class Node { * // get one of the parent group * var parentGroups = node.findAncestors('Group'); */ - findAncestors(selector?, includeSelf?, stopNode?) { + findAncestors(selector, includeSelf?, stopNode?) { var res: Array = []; if (includeSelf && this._isMatch(selector)) { @@ -1522,7 +1522,7 @@ export abstract class Node { * get ancestor (parent or parent of the parent, etc) of the node that match passed selector * @method * @name Konva.Node#findAncestor - * @param {String} [selector] selector for search + * @param {String} selector selector for search * @param {Boolean} [includeSelf] show we think that node is ancestro itself? * @param {Konva.Node} [stopNode] optional node where we need to stop searching (one of ancestors) * @returns {Konva.Node} ancestor @@ -1530,7 +1530,7 @@ export abstract class Node { * // get one of the parent group * var group = node.findAncestors('.mygroup'); */ - findAncestor(selector?, includeSelf?, stopNode?) { + findAncestor(selector, includeSelf?, stopNode?) { return this.findAncestors(selector, includeSelf, stopNode)[0]; } // is current node match passed selector?