CoreFiles by mySites.guru
rotate.min.js1 lines, 1,568 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
cbba65da147ababb3fc6047f6a73c4bf
sha1
a697cb7de408a0b2af5fa1f772ccd31815c01f75
sha256
e48c8e667126941a4d7c2dbec76d53807c8d57bef62751c8b641f10a8ee050fb
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},function(){'use strict';var a=function(a){var b=document.getElementById("image-source"),c=document.createElement("canvas");0<=a&&45>a||135<=a&&225>a||315<=a&&360>=a?(c.width=b.width,c.height=b.height):(c.width=b.height,c.height=b.width);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(a*Math.PI/180),d.drawImage(b,-b.width/2,-b.height/2);var e="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":"jpg",f=document.getElementById("jform_rotate_quality").value;Joomla.MediaManager.Edit.current.contents=c.toDataURL("image/".concat(e),f);var g=document.getElementById("image-preview");g.width=c.width,g.height=c.height,g.src=Joomla.MediaManager.Edit.current.contents,document.getElementById("jform_rotate_a").value=a,window.dispatchEvent(new Event("mediaManager.history.point"))},b=function(){setTimeout(function funct(){document.getElementById("jform_rotate_a").addEventListener("input",function(b){var c=b.target;a(parseInt(c.value,10));var d=[].slice.call(document.querySelectorAll("#jform_rotate_distinct label"));d.forEach(function(a){a.classList.remove("active"),a.classList.remove("focus")})});var b=[].slice.call(document.querySelectorAll("#jform_rotate_distinct label"));b.forEach(function(b){b.addEventListener("click",function(b){var c=b.target;a(parseInt(c.querySelector("input").value,10))})})},1e3)};Joomla.MediaManager.Edit.rotate={Activate:function Activate(a){b(a)},Deactivate:function Deactivate(){}}}();

The same content is in 3 releases, Joomla 4.0.0-beta to 4.0.0-beta3. See them all, or every version of this file.