/on-key-animate

Home assignment for confidential startup

Primary LanguageJavaScript

on-key-animate

Home assignment for confidential startup Directions: Write a web page (HTML + JS) that allows to present figures with a fixed size (even if the uploaded picture is bigger), and to move them using the keyboard. The page would have a '+' button on the side, which on click, allows to select some image file from the PC. Then the picture should appear on the animation mainframe in a random position and with a reduced size (e.g., 100X100 pixels). Now the user can move the figure to the right, left, up and down using the arrow keys. If the user clicks the '+' button multiple times, there would be multiple figues in the animation mainframe. Clicking a certain figure would put it in focus, and whichever figures is on focus would be under keyboard control. Do not invest in the page styling, but in functionality only.