Rename _subcomponentStyles to _subfeatureStyles.
MODIFY
src/feature.js
src/feature.js
@@ -46,7 +46,7 @@ var feature = function (arg) {
// subclasses can add keys to this for styles that apply to subcomponents of
// data items, such as individual vertices on lines or polygons.
- this._subcomponentStyles = {};
+ this._subfeatureStyles = {};
////////////////////////////////////////////////////////////////////////////
/**
@@ -395,7 +395,7 @@ var feature = function (arg) {
if (!Array.isArray(styleArray)) {
return m_this;
}
- if (m_this._subcomponentStyles[keyOrObject]) {
+ if (m_this._subfeatureStyles[keyOrObject]) {
if (styleArray.length && Array.isArray(styleArray[0])) {
m_this.style(keyOrObject, function (v, j, d, i) {
var val = (styleArray[i] || [])[j];

MODIFY
src/lineFeature.js
src/lineFeature.js
@@ -72,7 +72,7 @@ var lineFeature = function (arg) {
m_pointSearchInfo;
this.featureType = 'line';
- this._subcomponentStyles = {
+ this._subfeatureStyles = {
lineCap: true,
lineJoin: true,
strokeColor: true,

MODIFY
src/polygonFeature.js
src/polygonFeature.js
@@ -68,7 +68,7 @@ var polygonFeature = function (arg) {
m_coordinates = [];
this.featureType = 'polygon';
- this._subcomponentStyles = {
+ this._subfeatureStyles = {
fillColor: true,
fillOpacity: true,
lineCap: true,

MODIFY
tests/cases/feature.js
tests/cases/feature.js
@@ -218,7 +218,7 @@ describe('geo.feature', function () {
feat.draw = function () {
count += 1;
};
- feat._subcomponentStyles.opacity = true;
+ feat._subfeatureStyles.opacity = true;
feat.data([1, 2, 3, 4]);
feat.style({radius: 10, strokeColor: 'white', opacity: 0.5});
feat.style('radius', 10);

Rename _subcomponentStyles to _subfeatureStyles.