Commit 118fe430 authored by Evan W. Patton's avatar Evan W. Patton Committed by Susan Rati Lane

Force MockCircle default position to (0, 0)

Fixes #1379

Change-Id: I2682c4b12806e13a78524fce2d47293d46123f93
parent c8199a08
...@@ -134,7 +134,10 @@ public class MockCircle extends MockMapFeatureBaseWithFill { ...@@ -134,7 +134,10 @@ public class MockCircle extends MockMapFeatureBaseWithFill {
// JSNI Methods // JSNI Methods
private native void initCircle()/*-{ private native void initCircle()/*-{
this.@com.google.appinventor.client.editor.simple.components.MockMapFeatureBase::feature = this.@com.google.appinventor.client.editor.simple.components.MockMapFeatureBase::feature =
top.L.circle([], @com.google.appinventor.components.common.ComponentConstants::CIRCLE_PREFERRED_RADIUS, { // Fix for https://github.com/mit-cml/appinventor-sources/issues/1379: Initial coordinate
// should match default property values for Latitude and Longitude (i.e., (0, 0)) otherwise
// Leaflet throws an exception when we later add the Circle to the Map.
top.L.circle([0, 0], @com.google.appinventor.components.common.ComponentConstants::CIRCLE_PREFERRED_RADIUS, {
className: 'leaflet-interactive', className: 'leaflet-interactive',
weight: 1, weight: 1,
color: '#000', color: '#000',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment