Created
July 30, 2019 13:04
-
-
Save BMU-Verlag/91593500dab2c4eb76c849b9136059af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var coordX = 100; | |
var coordY = 100; | |
function moveSlider(slider) { | |
if (slider.id == "slider-x") coordX = slider.value*5; | |
if (slider.id == "slider-y") coordY = slider.value*5; | |
var rectangle = document.getElementById("rectID"); | |
rectangle.setAttribute("transform", "translate("+coordX+","+coordY+")"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment