Skip to content

InteractiveImage cleanup

Erwan Rouchet requested to merge interactive-bazar into master
  • Merged the elementId and zone props of InteractiveImage into a element prop
  • Removed the mainElement computed on InteractiveImage, made redundant by the element 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 to zoneBBox to make it clearer
  • Removed default values on the scale and position props on ImageLayer as those were wrong and always overriden by InteractiveImage
  • Removed MIN_IMAGE_HEIGHT from InteractiveImage and the minHeight 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 and corpusId computed properties on InteractiveImage
  • Removed the unused :image on <Tools> in InteractiveImage
  • Renamed position.updateView and rectify to recenter in ImageLayer to make them clearer
  • Renamed ANNOTATION_MODES to ELEMENT_CREATION_MODES in InteractiveImage to make it clearer
  • Removed the svgPoint data in InteractiveImage as it is just a local variable of getPosition
  • Removed a use of a global event variable, deprecated in JavaScript, in mouseAction on InteractiveImage
  • Removed unnecessary function arguments on translate and magnetize in InteractiveImage
  • Removed the unnecessary and confusing cleanEdited method on InteractiveImage
  • Ignored middle or right clicks entirely
Edited by Erwan Rouchet

Merge request reports

Loading