Skip to content

Commit 0dcb8e7

Browse files
committed
Fix docstrings and allow size to be specified as a constant
1 parent 455829a commit 0dcb8e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/plugin/jquery-plugin.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
* renderer: 'vgl',
145145
* features: [{
146146
* type: 'point',
147-
* size: 5,
147+
* radius: 5,
148148
* position: function (d) { return {x: d.geometry.x, y: d.geometry.y} },
149149
* fillColor: function (d, i) { return i < 5 ? 'red' : 'blue' },
150150
* stroke: false
@@ -160,7 +160,7 @@
160160
* features: [{
161161
* data: [...],
162162
* type: 'point',
163-
* size: 5,
163+
* radius: 5,
164164
* position: function (d) { return {x: d.geometry.x, y: d.geometry.y} },
165165
* fillColor: function (d, i) { return i < 5 ? 'red' : 'blue' },
166166
* stroke: false
@@ -226,8 +226,8 @@
226226
* @property {number} radius
227227
* Radius of the circle in pixels (ignored when <code>size</code>
228228
* is present)
229-
* @property {number} size
230-
* A numerical value mapped affinely to a radius in the range [5,20]
229+
* @property {function} size
230+
* A function returning a numerical value
231231
* @property {boolean} fill Presence or absence of the fill
232232
* @property {color} fillColor Interior color
233233
* @property {float} fillOpacity Opacity of the interior <code>[0,1]</code>
@@ -346,7 +346,7 @@
346346
var scl;
347347
if (feature.type === 'point') {
348348
if (feature.size) {
349-
feature._size = feature.size;
349+
feature._size = geo.util.ensureFunction(feature.size);
350350
} else if (feature.size === null) {
351351
delete feature._size;
352352
}

testing/test-cases/selenium-tests/jqueryPlugin/include.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ window.startTest = function (done) {
1212
features: [{
1313
type: 'point',
1414
data: [{x: 10, y: -10}],
15-
radius: 50,
15+
size: 50,
1616
fill: true,
1717
fillColor: 'brown',
1818
fillOpacity: 0.5,

0 commit comments

Comments
 (0)