Skip to content
Snippets Groups Projects
Commit 3e70ed78 authored by Gaelle.Barris's avatar Gaelle.Barris
Browse files

correction suppression texte

parent c10a4008
No related branches found
No related tags found
No related merge requests found
......@@ -107,11 +107,8 @@ var Class = Utils.Class(Edition, {
callbackPrompt: function (instance, feature, label) {
if (label === null) {
label = "";
}
if (label !== "") {
var style;
if (label !== null && label !== "") {
if (feature.get("dAnnotationType") === "arrowAnnotation") {
feature.set("dAnnotationType", "arrowAndTexteAnnotation");
} else {
......@@ -124,7 +121,7 @@ var Class = Utils.Class(Edition, {
if (feature.get("dAnnotationType") === "arrowAndTexteAnnotation") {
this.editionLayer.refreshFeatureStyle(feature);
}
var style = feature.getStyle();
style = feature.getStyle();
var textStyle = this.editionLayer.getTextStyle(feature).getText();
if (feature.get("dAnnotationType") === "arrowAndTexteAnnotation") {
......@@ -135,7 +132,27 @@ var Class = Utils.Class(Edition, {
feature.setStyle(style);
this.interaction.getFeatures().remove(feature);
}else{
} else {
if (label === "" && feature.get("labelTextAnnotion")) {
if (feature.get("dAnnotationType") === "arrowAndTexteAnnotation") {
feature.set("dAnnotationType", "arrowAnnotation");
} else {
feature.set("dAnnotationType", "drawAnnotation");
feature.dAnnotationType = "drawAnnotation";
}
feature.unset("labelTextAnnotion");
if (feature.get("dAnnotationType") === "arrowAndTexteAnnotation") {
this.editionLayer.refreshFeatureStyle(feature);
}
style = feature.getStyle();
if (feature.get("dAnnotationType") === "arrowAndTexteAnnotation") {
style[0].setText(null);
} else{
style.setText(null);
}
feature.setStyle(style);
this.interaction.getFeatures().remove(feature);
}
//feature.feature.destroy();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment