question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't edit a circle

See original GitHub issue
  • I’m reporting a bug, not asking for help
  • I’ve looked at the documentation to make sure the behaviour is documented and expected
  • I’m sure this is a Leaflet Draw code issue, not an issue with my own code nor with the framework I’m using (Cordova, Ionic, Angular, React…)
  • I’ve searched through the issues to make sure it’s not yet reported

How to reproduce

  • Leaflet version I’m using: 1.2.0

  • Leaflet Draw version I’m using: 0.4.13

  • Browser (with version) I’m using: Chrome

  • OS/Platform (with version) I’m using: MacOS High Sierra

  • Create a circle

  • Edit this circle

  • this example is as simple as possible

  • this example does not rely on any third party code

Editing the radius of any circle created, the new radius is not applied http://leaflet.github.io/Leaflet.draw/docs/examples/full.html

I’ve attached a gif explaining the problem: d

I have created a simple project installing Leaflet.Draw via npm and this simple project had the same behavior as the full example in the link. My local project consists of a index.html:

<!DOCTYPE html>
<html>
<body>
    <div id='map' style="width:900px;height:900px"></div>
</body>
<script src="node_modules/leaflet/dist/leaflet.js"></script>
<link rel="stylesheet" type="text/css" href="node_modules/leaflet/dist/leaflet.css">
<script src="node_modules/leaflet-draw/dist/leaflet.draw.js"></script>
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-draw/dist/leaflet.draw.css">
<script src="index.js"></script>
</html>

and a index.js:

var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// FeatureGroup is to store editable layers
var drawnItems = new L.FeatureGroup();
map.addLayer(drawnItems);
var drawControl = new L.Control.Draw({
    edit: {
        featureGroup: drawnItems
    }
});
map.addControl(drawControl);

map.on(L.Draw.Event.CREATED, function (e) {
    var type = e.layerType;
    var layer = e.layer;
    drawnItems.addLayer(layer);
});
map.on('draw:edited', function (e) {
    var layers = e.layers;
    layers.eachLayer(function (layer) {
        drawnItems.addLayer(layer);
    });
});

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
ChaudhryAtifcommented, Jan 16, 2018

@GustavoZatorre I have this issue in 0.4.13

1reaction
ChaudhryAtifcommented, Jan 10, 2018

I’m facing this issue as well. I’m able to drag the circle using the middle handler, but not able to resize it.

@LeoMaldonado Temporary solution: https://github.com/Leaflet/Leaflet.draw/issues/808#issuecomment-350340503

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't edit vertices of the circle after adding it : r/blenderhelp
So after adding the circle, I was trying to adjust the number of vertices, but this whole panel is disabled for some reason....
Read more >
Unable to edit anything - I get a circle with red line through it
Solved: Adobe Photoshop 22 will not let me update anything - my cursor is a Circle with a red line through it -...
Read more >
Cannot edit circular pattern in a sketch - Fusion 360
If I make another circle and a pattern inside, I can edit that new pattern perfectly. Its the existing pattern from a loaded...
Read more >
Invisible Proportional Editing Circle - Blender Stack Exchange
I was in edit mode and I wanted to move a vertex with proportional editing on. So I clicked on a point and...
Read more >
Fusion 360 Edit a Circle after creation - YouTube
Many users are confused about how to edit a circle's dimensions after creation. ... Your browser can't play this video.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found