From 3234975e4684c0d917891b612b57e0c36f86c648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 31 Dec 2015 18:32:56 +0100 Subject: [PATCH] Include comment about methods produced on the fly. For easier searching. --- src/path/Curve.js | 3 +++ src/path/CurveLocation.js | 3 +++ src/path/Path.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/path/Curve.js b/src/path/Curve.js index 0b43d7a5..73ee42ba 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -1164,6 +1164,9 @@ new function() { // // Scope to inject various curve evaluation methods // the need to create a Curve object first, as required by the code that // finds path intersections. function(name) { + // NOTE: (For easier searching): This loop produces: + // getPointAt, getTangentAt, getNormalAt, getWeightedTangentAt, + // getWeightedNormalAt, getCurvatureAt this[name + 'At'] = function(offset, isParameter) { var values = this.getValues(); return Curve[name](values, isParameter ? offset diff --git a/src/path/CurveLocation.js b/src/path/CurveLocation.js index c1cf2878..d0eb9040 100644 --- a/src/path/CurveLocation.js +++ b/src/path/CurveLocation.js @@ -512,6 +512,9 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{ } }, Base.each(Curve.evaluateMethods, function(name) { // Produce getters for #getTangent() / #getNormal() / #getCurvature() + // NOTE: (For easier searching): This loop produces: + // getPointAt, getTangentAt, getNormalAt, getWeightedTangentAt, + // getWeightedNormalAt, getCurvatureAt var get = name + 'At'; this[name] = function() { var parameter = this.getParameter(), diff --git a/src/path/Path.js b/src/path/Path.js index 19ba660d..03d99951 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1679,6 +1679,9 @@ var Path = PathItem.extend(/** @lends Path# */{ // TODO: contains(item) }, Base.each(Curve.evaluateMethods, function(name) { + // NOTE: (For easier searching): This loop produces: + // getPointAt, getTangentAt, getNormalAt, getWeightedTangentAt, + // getWeightedNormalAt, getCurvatureAt this[name + 'At'] = function(offset, isParameter) { var loc = this.getLocationAt(offset, isParameter); return loc && loc[name]();