diff --git a/README.md b/README.md index c3ee500ed..cd5db2cc9 100644 --- a/README.md +++ b/README.md @@ -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*) @@ -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.