From b9f6fd919a6fca42d384fab0d0543e9abb114b4f Mon Sep 17 00:00:00 2001 From: Mike Sierra Date: Wed, 9 Oct 2013 15:23:28 -0400 Subject: [PATCH] EDIT & COMMENT Element.marker --- src/svg.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/svg.js b/src/svg.js index 1e26db6..9d935a3 100644 --- a/src/svg.js +++ b/src/svg.js @@ -1943,6 +1943,8 @@ function arrayFirstValue(arr) { p.node.appendChild(this.node); return p; }; +// SIERRA Element.marker(): clarify what a reference point is. E.g., helps you offset the object from its edge such as when centering it over a path. +// SIERRA Element.marker(): I suggest the method should accept default reference point values. Perhaps centered with (refX = width/2) and (refY = height/2)? Also, couldn't it assume the element's current _width_ and _height_? And please specify what _x_ and _y_ mean: offsets? If so, from where? Couldn't they also be assigned default values? /*\ * Element.marker [ method ] @@ -1957,7 +1959,7 @@ function arrayFirstValue(arr) { - refX (number) - refY (number) = (Element) `` element - * You can use pattern later on as an argument for `marker-start` or `marker-end` attributes. + * You can specify the marker later as an argument for `marker-start`, `marker-end`, `marker-mid`, and `marker` attributes. The `marker` attribute places the marker at every point along the path, and `marker-mid` places them at every point except the start and end. \*/ // TODO add usage for markers elproto.marker = function (x, y, width, height, refX, refY) {