InteractiveImage cleanup
- Merged the
elementId
andzone
props of InteractiveImage into aelement
prop - Removed the
mainElement
computed on InteractiveImage, made redundant by theelement
prop - Added a
polygonsEqual
helper to prevent patching an element's polygon when it has not changed - Removed an unnecessary
<svg>
in ImageLayer, made redundant by the one in InteractiveImage - Renamed
elementCoords
tozoneBBox
to make it clearer - Removed default values on the
scale
andposition
props on ImageLayer as those were wrong and always overriden by InteractiveImage - Removed
MIN_IMAGE_HEIGHT
from InteractiveImage and theminHeight
prop on ImageLayer as it's just a constant - Removed the useless
imageCoords
prop on ImageLayer - Removed the useless
zoneCoords
computed on ImageLayer - Removed the unnecessary
image
andcorpusId
computed properties on InteractiveImage - Removed the unused
:image
on<Tools>
in InteractiveImage - Renamed
position.updateView
andrectify
torecenter
in ImageLayer to make them clearer - Renamed
ANNOTATION_MODES
toELEMENT_CREATION_MODES
in InteractiveImage to make it clearer - Removed the
svgPoint
data in InteractiveImage as it is just a local variable ofgetPosition
- Removed a use of a global
event
variable, deprecated in JavaScript, inmouseAction
on InteractiveImage - Removed unnecessary function arguments on
translate
andmagnetize
in InteractiveImage - Removed the unnecessary and confusing
cleanEdited
method on InteractiveImage - Ignored middle or right clicks entirely
Edited by Erwan Rouchet