Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug EditControl --> shapeOptions, drawError stopped working in v0.20.4 #162

Open
Utrehd opened this issue Sep 21, 2022 · 0 comments
Open

Comments

@Utrehd
Copy link

Utrehd commented Sep 21, 2022

By changing from v0.20.3 to v0.20.4 the onDrawStop event would fire just after the onDrawStart.
Not allowing any shape to be drawn.

I found out that this can be negated by removing the shapeOptions : {} and drawError : {} parameters.

Following works with v0.20.3 and not with v0.20.4.

<EditControl
        ...code...
        draw={{
                polyline: false,
                polygon: {
                        metric: true,
                        showArea: true,
                        allowIntersection: false, // Restricts shapes to simple polygons

                        drawError: {
                            color: '#FF5733', // Color the shape will turn when intersects
                            message: '<strong>Polygon!<strong> (allowIntersection: false)' // Message that will show when intersect
                        },
                       shapeOptions: {
                           color: '#BF9000'
                       }

              },
              circle: false, // Turns off this drawing tool
              rectangle: false,
              marker: false,
              circlemarker: false,
        }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant