File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
contribs/gmf/src/directives/partials Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 7
7
class ="form-control "/>
8
8
</ div >
9
9
< div
10
- ng-if ="fsCtrl.type !== 'Text' && fsCtrl.type !== 'Circle' "
10
+ ng-if ="fsCtrl.type !== 'Text' "
11
11
class ="form-group ">
12
12
< input
13
13
id ="gmf-featurestyle-showlabel "
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ ngeo.FeatureHelper.prototype.getPolygonStyle_ = function(feature) {
343
343
} )
344
344
} ) ] ;
345
345
if ( showMeasure || showLabel ) {
346
- if ( azimut !== undefined ) {
346
+ if ( showMeasure && azimut !== undefined ) {
347
347
// Radius style:
348
348
const line = this . getRadiusLine ( feature , azimut ) ;
349
349
const length = ngeo . interaction . Measure . getFormattedLength (
@@ -374,6 +374,17 @@ ngeo.FeatureHelper.prototype.getPolygonStyle_ = function(feature) {
374
374
offsetY : Math . sin ( ( azimut - 90 ) * Math . PI / 180 ) * 20
375
375
} )
376
376
} ) ) ;
377
+
378
+ //Label Style
379
+ if ( showLabel ) {
380
+ styles . push ( new ol . style . Style ( {
381
+ text : this . createTextStyle_ ( {
382
+ text : this . getNameProperty ( feature ) ,
383
+ offsetY : - 8 ,
384
+ exceedLength : true
385
+ } )
386
+ } ) ) ;
387
+ }
377
388
} else {
378
389
//Label Style
379
390
const textLabelValues = [ ] ;
@@ -389,7 +400,6 @@ ngeo.FeatureHelper.prototype.getPolygonStyle_ = function(feature) {
389
400
styles . push ( new ol . style . Style ( {
390
401
text : this . createTextStyle_ ( {
391
402
text : textLabelValue ,
392
- offsetY : - ( 8 / 2 + 4 ) ,
393
403
exceedLength : true
394
404
} )
395
405
} ) ) ;
You can’t perform that action at this time.
0 commit comments