retejs / dock-plugin

https://retejs.org
MIT License
5 stars 18 forks source link

configurable strategies #32

Open mshariq-nerd opened 6 months ago

mshariq-nerd commented 6 months ago

I want to use only drag & drop strategy to move items from dock to the editor. I am seeing two strategies implemented [DropStrategy, ClickStrategy] but not configurable. Is there any way to achieve that?

Ni55aN commented 6 months ago

It's not really customizable, but you can fork and change it easily. There are two options:

  1. place the plugin as part of the source code of your project (if it is based on TS)
  2. make changes to the forked repository and create it using the GH Action "Build and Push"

PRs are welcome. For now, let's keep this tocket as an enhancement request

UPD: there is a hotfix, but I'd not recommend it

area.use(dock);
dock.clickStrategy = { add() { } }
mshariq-nerd commented 6 months ago

Thanks! @Ni55aN, Let me check this and will see the other possibilities like removing click listener in the dockMenu items.