not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
546 B

  1. /* Clear button will clear the canvas */
  2. define([], function() {
  3. function onClearClick() {
  4. PaintApp.clearCanvas();
  5. /* If the activity is shared, will send the instruction to everyone */
  6. if (PaintApp.data.isShared) {
  7. PaintApp.collaboration.sendMessage({
  8. action: 'clearCanvas'
  9. });
  10. }
  11. }
  12. function initGui() {
  13. var clearButton = document.getElementById('clear-button');
  14. clearButton.addEventListener('click', onClearClick);
  15. }
  16. var clearButton = {
  17. initGui: initGui
  18. };
  19. return clearButton;
  20. });