CoreFiles by mySites.guru
rotate.min.js1 lines, 1,532 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
9c8eebc3dfc48ec5aa90514a08d87679
sha1
854a0bd41b62221c88e59592a8db4d18c30dc3a3
sha256
658f27bcfa5810fd9262d783947bf6406bb58802fb5e5a11bdd18db9d8c3e1f6
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 c(){document.getElementById("jform_rotate_a").addEventListener("input",function(b){a(parseInt(b.target.value,10));var c=[].slice.call(document.querySelectorAll("#jform_rotate_distinct label"));c.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){a(parseInt(b.target.querySelector("input").value,10))})})},1e3)};Joomla.MediaManager.Edit.rotate={Activate:function c(a){b(a)},Deactivate:function a(){}}}();

The same content is in 2 releases, Joomla 4.0.0-alpha6 to 4.0.0-alpha7. See them all, or every version of this file.