Include comment about methods produced on the fly.

For easier searching.
This commit is contained in:
Jürg Lehni 2015-12-31 18:32:56 +01:00
parent fa15b083b0
commit 3234975e46
3 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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(),

View file

@ -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]();