Skip to content

Commit 0e14639

Browse files
committed
Update docs for changes proposed in openlayers#2684
1 parent 88c3079 commit 0e14639

File tree

5 files changed

+92
-48
lines changed

5 files changed

+92
-48
lines changed

src/ol/style/fillstyle.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ ol.style.Fill.prototype.getColor = function() {
3232

3333

3434
/**
35-
* Set the color. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
36-
* or feature overlay for changes to take effect.
35+
* Set the color. When this style is used as a layer, feature or ImageVector
36+
* source style, call `changed()` on the layer, feature or ImageVector source
37+
* for the change to take effect. When used as a FeatureOverlay style, call
38+
* `render()` on the map.
3739
*
3840
* @param {ol.Color|string} color Color.
3941
* @api

src/ol/style/imagestyle.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ ol.style.Image.prototype.getSize = goog.abstractMethod;
151151

152152

153153
/**
154-
* Set the zIndex. Call `setStyle()` or `dispatchChangeEvent()` on feature,
155-
* layer or feature overlay for changes to take effect.
154+
* Set the opacity. When this style is used as a layer, feature or ImageVector
155+
* source style, call `changed()` on the layer, feature or ImageVector source
156+
* for the change to take effect. When used as a FeatureOverlay style, call
157+
* `render()` on the map.
156158
*
157159
* @param {number} opacity Opacity.
158160
*/
@@ -162,9 +164,10 @@ ol.style.Image.prototype.setOpacity = function(opacity) {
162164

163165

164166
/**
165-
* Set whether to rotate the style with the view. Call `setStyle()` or
166-
* `dispatchChangeEvent()` on feature, layer or feature overlay for changes to
167-
* take effect.
167+
* Set whether to rotate the style with the view. When this style is used as a
168+
* layer, feature or ImageVector source style, call `changed()` on the layer,
169+
* feature or ImageVector source for the change to take effect. When used as a
170+
* FeatureOverlay style, call `render()` on the map.
168171
*
169172
* @param {boolean} rotateWithView Rotate with map.
170173
*/
@@ -174,8 +177,10 @@ ol.style.Image.prototype.setRotateWithView = function(rotateWithView) {
174177

175178

176179
/**
177-
* Set the rotation. Call `setStyle()` or `dispatchChangeEvent()` on feature,
178-
* layer or feature overlay for changes to take effect.
180+
* Set the rotation. When this style is used as a layer, feature or ImageVector
181+
* source style, call `changed()` on the layer, feature or ImageVector source
182+
* for the change to take effect. When used as a FeatureOverlay style, call
183+
* `render()` on the map.
179184
*
180185
* @param {number} rotation Rotation.
181186
* @api
@@ -186,8 +191,10 @@ ol.style.Image.prototype.setRotation = function(rotation) {
186191

187192

188193
/**
189-
* Set the scale. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
190-
* or feature overlay for changes to take effect.
194+
* Set the scale. When this style is used as a layer, feature or ImageVector
195+
* source style, call `changed()` on the layer, feature or ImageVector source
196+
* for the change to take effect. When used as a FeatureOverlay style, call
197+
* `render()` on the map.
191198
*
192199
* @param {number} scale Scale.
193200
* @api
@@ -198,9 +205,10 @@ ol.style.Image.prototype.setScale = function(scale) {
198205

199206

200207
/**
201-
* Set whether to snap the image to the closest pixel. Call `setStyle()` or
202-
* `dispatchChangeEvent()` on feature, layer or feature overlay for changes to
203-
* take effect.
208+
* Set whether to snap the image to the closest pixel. When this style is used
209+
* as a layer, feature or ImageVector source style, call `changed()` on the
210+
* layer, feature or ImageVector source for the change to take effect. When used
211+
* as a FeatureOverlay style, call `render()` on the map.
204212
*
205213
* @param {boolean} snapToPixel Snap to pixel?
206214
*/

src/ol/style/strokestyle.js

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ ol.style.Stroke.prototype.getWidth = function() {
110110

111111

112112
/**
113-
* Set the color. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
114-
* or feature overlay for changes to take effect.
113+
* Set the color. When this style is used as a layer, feature or ImageVector
114+
* source style, call `changed()` on the layer, feature or ImageVector source
115+
* for the change to take effect. When used as a FeatureOverlay style, call
116+
* `render()` on the map.
115117
*
116118
* @param {ol.Color|string} color Color.
117119
* @api
@@ -122,8 +124,10 @@ ol.style.Stroke.prototype.setColor = function(color) {
122124

123125

124126
/**
125-
* Set the line cap. Call `setStyle()` or `dispatchChangeEvent()` on feature,
126-
* layer or feature overlay for changes to take effect.
127+
* Set the line cap. When this style is used as a layer, feature or ImageVector
128+
* source style, call `changed()` on the layer, feature or ImageVector source
129+
* for the change to take effect. When used as a FeatureOverlay style, call
130+
* `render()` on the map.
127131
*
128132
* @param {string|undefined} lineCap Line cap.
129133
* @api
@@ -134,8 +138,10 @@ ol.style.Stroke.prototype.setLineCap = function(lineCap) {
134138

135139

136140
/**
137-
* Set the line dash. Call `setStyle()` or `dispatchChangeEvent()` on feature,
138-
* layer or feature overlay for changes to take effect.
141+
* Set the line dash. When this style is used as a layer, feature or ImageVector
142+
* source style, call `changed()` on the layer, feature or ImageVector source
143+
* for the change to take effect. When used as a FeatureOverlay style, call
144+
* `render()` on the map.
139145
*
140146
* @param {Array.<number>} lineDash Line dash.
141147
* @api
@@ -146,8 +152,10 @@ ol.style.Stroke.prototype.setLineDash = function(lineDash) {
146152

147153

148154
/**
149-
* Set the line join. Call `setStyle()` or `dispatchChangeEvent()` on feature,
150-
* layer or feature overlay for changes to take effect.
155+
* Set the line join. When this style is used as a layer, feature or ImageVector
156+
* source style, call `changed()` on the layer, feature or ImageVector source
157+
* for the change to take effect. When used as a FeatureOverlay style, call
158+
* `render()` on the map.
151159
*
152160
* @param {string|undefined} lineJoin Line join.
153161
* @api
@@ -158,8 +166,10 @@ ol.style.Stroke.prototype.setLineJoin = function(lineJoin) {
158166

159167

160168
/**
161-
* Set the miter limit. Call `setStyle()` or `dispatchChangeEvent()` on feature,
162-
* layer or feature overlay for changes to take effect.
169+
* Set the miter limit. When this style is used as a layer, feature or
170+
* ImageVector source style, call `changed()` on the layer, feature or
171+
* ImageVector source for the change to take effect. When used as a
172+
* FeatureOverlay style, call `render()` on the map.
163173
*
164174
* @param {number|undefined} miterLimit Miter limit.
165175
* @api
@@ -170,8 +180,10 @@ ol.style.Stroke.prototype.setMiterLimit = function(miterLimit) {
170180

171181

172182
/**
173-
* Set the width. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
174-
* or feature overlay for changes to take effect.
183+
* Set the width. When this style is used as a layer, feature or ImageVector
184+
* source style, call `changed()` on the layer, feature or ImageVector source
185+
* for the change to take effect. When used as a FeatureOverlay style, call
186+
* `render()` on the map.
175187
*
176188
* @param {number|undefined} width Width.
177189
* @api

src/ol/style/style.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ ol.style.Style.prototype.getZIndex = function() {
101101

102102

103103
/**
104-
* Set the zIndex. Call `setStyle()` or `dispatchChangeEvent()` on feature,
105-
* layer or feature overlay for changes to take effect.
104+
* Set the zIndex. When this style is used as a layer, feature or ImageVector
105+
* source style, call `changed()` on the layer, feature or ImageVector source
106+
* for the change to take effect. When used as a FeatureOverlay style, call
107+
* `render()` on the map.
106108
*
107109
* @param {number|undefined} zIndex ZIndex.
108110
* @api

src/ol/style/textstyle.js

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ ol.style.Text.prototype.getTextBaseline = function() {
165165

166166

167167
/**
168-
* Set the font. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
169-
* or feature overlay for changes to take effect.
168+
* Set the font. When this style is used as a layer, feature or ImageVector
169+
* source style, call `changed()` on the layer, feature or ImageVector source
170+
* for the change to take effect. When used as a FeatureOverlay style, call
171+
* `render()` on the map.
170172
*
171173
* @param {string|undefined} font Font.
172174
* @api
@@ -177,8 +179,10 @@ ol.style.Text.prototype.setFont = function(font) {
177179

178180

179181
/**
180-
* Set the x offset. Call `setStyle()` or `dispatchChangeEvent()` on feature,
181-
* layer or feature overlay for changes to take effect.
182+
* Set the x offset. When this style is used as a layer, feature or ImageVector
183+
* source style, call `changed()` on the layer, feature or ImageVector source
184+
* for the change to take effect. When used as a FeatureOverlay style, call
185+
* `render()` on the map.
182186
*
183187
* @param {number} offsetX Horizontal text offset.
184188
*/
@@ -188,8 +192,10 @@ ol.style.Text.prototype.setOffsetX = function(offsetX) {
188192

189193

190194
/**
191-
* Set the y offset. Call `setStyle()` or `dispatchChangeEvent()` on feature,
192-
* layer or feature overlay for changes to take effect.
195+
* Set the y offset. When this style is used as a layer, feature or ImageVector
196+
* source style, call `changed()` on the layer, feature or ImageVector source
197+
* for the change to take effect. When used as a FeatureOverlay style, call
198+
* `render()` on the map.
193199
*
194200
* @param {number} offsetY Vertical text offset.
195201
*/
@@ -199,8 +205,10 @@ ol.style.Text.prototype.setOffsetY = function(offsetY) {
199205

200206

201207
/**
202-
* Set the fill. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
203-
* or feature overlay for changes to take effect.
208+
* Set the fill. When this style is used as a layer, feature or ImageVector
209+
* source style, call `changed()` on the layer, feature or ImageVector source
210+
* for the change to take effect. When used as a FeatureOverlay style, call
211+
* `render()` on the map.
204212
*
205213
* @param {ol.style.Fill} fill Fill style.
206214
* @api
@@ -211,8 +219,10 @@ ol.style.Text.prototype.setFill = function(fill) {
211219

212220

213221
/**
214-
* Set the rotation. Call `setStyle()` or `dispatchChangeEvent()` on feature,
215-
* layer or feature overlay for changes to take effect.
222+
* Set the rotation. When this style is used as a layer, feature or ImageVector
223+
* source style, call `changed()` on the layer, feature or ImageVector source
224+
* for the change to take effect. When used as a FeatureOverlay style, call
225+
* `render()` on the map.
216226
*
217227
* @param {number|undefined} rotation Rotation.
218228
* @api
@@ -223,8 +233,10 @@ ol.style.Text.prototype.setRotation = function(rotation) {
223233

224234

225235
/**
226-
* Set the scale. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
227-
* or feature overlay for changes to take effect.
236+
* Set the scale. When this style is used as a layer, feature or ImageVector
237+
* source style, call `changed()` on the layer, feature or ImageVector source
238+
* for the change to take effect. When used as a FeatureOverlay style, call
239+
* `render()` on the map.
228240
*
229241
* @param {number|undefined} scale Scale.
230242
* @api
@@ -235,8 +247,10 @@ ol.style.Text.prototype.setScale = function(scale) {
235247

236248

237249
/**
238-
* Set the stroke. Call `setStyle()` or `dispatchChangeEvent()` on feature,
239-
* layer or feature overlay for changes to take effect.
250+
* Set the stroke. When this style is used as a layer, feature or ImageVector
251+
* source style, call `changed()` on the layer, feature or ImageVector source
252+
* for the change to take effect. When used as a FeatureOverlay style, call
253+
* `render()` on the map.
240254
*
241255
* @param {ol.style.Stroke} stroke Stroke style.
242256
* @api
@@ -247,8 +261,10 @@ ol.style.Text.prototype.setStroke = function(stroke) {
247261

248262

249263
/**
250-
* Set the text. Call `setStyle()` or `dispatchChangeEvent()` on feature, layer
251-
* or feature overlay for changes to take effect.
264+
* Set the text. When this style is used as a layer, feature or ImageVector
265+
* source style, call `changed()` on the layer, feature or ImageVector source
266+
* for the change to take effect. When used as a FeatureOverlay style, call
267+
* `render()` on the map.
252268
*
253269
* @param {string|undefined} text Text.
254270
* @api
@@ -259,8 +275,10 @@ ol.style.Text.prototype.setText = function(text) {
259275

260276

261277
/**
262-
* Set the text alignment. Call `setStyle()` or `dispatchChangeEvent()` on
263-
* feature, layer or feature overlay for changes to take effect.
278+
* Set the text alignment. When this style is used as a layer, feature or
279+
* ImageVector source style, call `changed()` on the layer, feature or
280+
* ImageVector source for the change to take effect. When used as a
281+
* FeatureOverlay style, call `render()` on the map.
264282
*
265283
* @param {string|undefined} textAlign Text align.
266284
* @api
@@ -271,8 +289,10 @@ ol.style.Text.prototype.setTextAlign = function(textAlign) {
271289

272290

273291
/**
274-
* Set the text baseline. Call `setStyle()` or `dispatchChangeEvent()` on
275-
* feature, layer or feature overlay for changes to take effect.
292+
* Set the text baseline. When this style is used as a layer, feature or
293+
* ImageVector source style, call `changed()` on the layer, feature or
294+
* ImageVector source for the change to take effect. When used as a
295+
* FeatureOverlay style, call `render()` on the map.
276296
*
277297
* @param {string|undefined} textBaseline Text baseline.
278298
* @api

0 commit comments

Comments
 (0)