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

Issue #1332 Updated Document Tooltip Feature in README.md #1336

Merged
merged 4 commits into from
Jan 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ map.whenReady(function() {
* [rotation](#rotation)
* [selected](#selected)
* [suppressToolbar](#Suppress-Toolbar)

* [tooltipText](#Tooltip-Text)
### Actions

* `actions` (*optional*, default: [`L.DragAction`, `L.ScaleAction`, `L.DistortAction`, `L.RotateAction`, `L.FreeRotateAction`, `L.LockAction`, `L.OpacityAction`, `L.BorderAction`, `L.ExportAction`, `L.DeleteAction`], value: *array*)
Expand Down Expand Up @@ -334,7 +334,19 @@ imgGroup = L.distortableCollection({
suppressToolbar: true,
}).addTo(map);
```

### Tooltip Text
`tooltipText` (*optional*, default: '', value: *string*)
This provides the flexibility to add tooltip text to every image placed on the tile layer.

For ex.

```js
// Sets up tooltip text for an image, the text is displayed when mouse is placed on it
img = L.distortableImageOverlay(
'example.jpg',
{tooltipText: 'Sample text'}
);
```
### UI and functionalities

Currently it supports multiple image selection and translations, and WIP we are working on porting all editing tools to work for it, such as opacity, etc. Image distortions (via modes) still use the single-image interface.
Expand Down