Skip to content

[Bug] editable-layers not working well in edit mode #217

Open
@SauvageThomas

Description

@SauvageThomas

Module

  • deck.gl-community/arrow-layers
  • deck.gl-community/bing-maps
  • deck.gl-community/editable-layers
  • deck.gl-community/experimental
  • deck.gl-community/graph-layers
  • deck.gl-community/layers
  • deck.gl-community/react
  • deck.gl-community/react-graph-layer

Description

Hi,

I'm trying to create polygons in DrawPolygonMode and while the click is handled well, the line layer is not connected to the mouse cursor. Unfortunately, the cursor is not shown on the screenshot, I've made a blue circle to show where my cursor was during the screenshot. The line is drawn far away of my cursor.

Image

While the guides layer seems off, the geojson layer is rendering the polygon at the right place. Is there something with my code or is it an issue ?

Expected Behavior

No response

Steps to Reproduce

const editableLayer = new EditableGeoJsonLayer({
        id: 'polygons',
        data: polygons.geoJson,
        mode: DrawPolygonMode,
        selectedFeatureIndexes,
        _subLayerProps: {
            geojson: {
                coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
                getFillColor: [255, 255, 255],
                getLineColor: [255, 0, 0],
            },
            guides: {
                coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
            },
        },
        
        onEdit: (event) => {
            const { updatedData } = event;
            polygons.geoJson = updatedData;
        }
    });

Environment

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions