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.

46 lines
1.3 KiB

  1. define(["widepalette",
  2. "text!speechpalette.html"], function (palette, template) {
  3. 'use strict';
  4. var activitypalette = {};
  5. activitypalette.ActivityPalette = function (activityButton,
  6. datastoreObject) {
  7. palette.Palette.call(this, activityButton);
  8. var activityTitle;
  9. var descriptionLabel;
  10. var descriptionBox;
  11. this.getPalette().id = "activity-palette";
  12. var containerElem = document.createElement('div');
  13. containerElem.innerHTML = template;
  14. this.setContent([containerElem]);
  15. this.pitchScale = containerElem.querySelector('#pitchvalue');
  16. this.rateScale = containerElem.querySelector('#ratevalue');
  17. this.pitchScale.onclick = function() {
  18. document.getElementById('pitch').innerHTML = this.value;
  19. }
  20. this.rateScale.onclick = function() {
  21. document.getElementById('rate').innerHTML = this.value*(300/100) + 10;
  22. }
  23. };
  24. activitypalette.ActivityPalette.prototype =
  25. Object.create(palette.Palette.prototype, {
  26. setTitleDescription: {
  27. value: "Speech Palette:",
  28. enumerable: true,
  29. configurable: true,
  30. writable: true
  31. }
  32. });
  33. return activitypalette;
  34. });