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

DeleteHandlerOptions is empty in the documentation #408

Closed
pgrm opened this issue May 25, 2015 · 1 comment
Closed

DeleteHandlerOptions is empty in the documentation #408

pgrm opened this issue May 25, 2015 · 1 comment

Comments

@pgrm
Copy link

pgrm commented May 25, 2015

Hi, the documentation of DeleteHandlerOptions is empty. Does it mean the object doesn't really have any properties or is it just missing?

I've found this old issue #119, which requests to add selectedPathOptions to DeleteHandlerOptions, which happens to be the only property on EditHandlerOptions. This makes me think that DeleteHandlerOptions doesn't have any properties, is that correct?

In which case, what is the point of the property? Is it for future ideas?

Thanks for clarification

@ericdrosas87
Copy link

The solution is simply to omit the field entirely if you do not want to use it:

`
interface EditOptions {
/**
* This is the FeatureGroup that stores all editable shapes.
* THIS IS REQUIRED FOR THE EDIT TOOLBAR TO WORK
*
* @default null
*/
featureGroup: FeatureGroup;

        /**
         * Edit handler options. Set to false to disable handler.
         *
         * @default null
         */
        edit?: DrawOptions.EditHandlerOptions | false;

        /**
         * Delete handler options. Set to false to disable handler.
         *
         * Default value: null
         */
        remove?: null | false;
    }

`

I pulled the above lines straight from the source code, as you can see the remove property can either be null or false.

I propose opening a bug and removing/rewording these comments and updating the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants