Skip to content

Commit

Permalink
fix(ol:Controls) : Control Drawing - stop evenement click lors de la …
Browse files Browse the repository at this point in the history
…saisie des géométrie
  • Loading branch information
pjjmunier committed Mar 30, 2020
1 parent cf2062e commit c6d5142
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2>Ajout des outils de dessin avec options</h2>

if (feature) {

var coord = evt.coordinates;
var coord = evt.coordinate;
var props = feature.getProperties();
// Offset the popup so it points at the middle of the marker not the tip
popup.setOffset([0, -22]);
Expand Down
4 changes: 4 additions & 0 deletions src/OpenLayers/Controls/Drawing.js
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ var Drawing = (function (Control) {
case this._addUID("drawing-tool-point"):
if (context.dtOptions["points"].active) {
context.interactionCurrent = new DrawInteraction({
stopClick : true,
features : context.layer.getSource().getFeaturesCollection(),
style : new Style({
image : new Icon(this._getIconStyleOptions(this.options.markersList[0]))
Expand All @@ -1350,6 +1351,7 @@ var Drawing = (function (Control) {
case this._addUID("drawing-tool-line"):
if (context.dtOptions["lines"].active) {
context.interactionCurrent = new DrawInteraction({
stopClick : true,
features : context.layer.getSource().getFeaturesCollection(),
style : new Style({
image : new Circle({
Expand Down Expand Up @@ -1379,6 +1381,7 @@ var Drawing = (function (Control) {
case this._addUID("drawing-tool-polygon"):
if (context.dtOptions["polygons"].active) {
context.interactionCurrent = new DrawInteraction({
stopClick : true,
features : context.layer.getSource().getFeaturesCollection(),
style : new Style({
image : new Circle({
Expand Down Expand Up @@ -1415,6 +1418,7 @@ var Drawing = (function (Control) {
// text : creation de points invisibles avec un label.
if (context.dtOptions["text"].active) {
context.interactionCurrent = new DrawInteraction({
stopClick : true,
features : context.layer.getSource().getFeaturesCollection(),
style : new Style({
image : new Circle({
Expand Down

0 comments on commit c6d5142

Please sign in to comment.