appui.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //-----App ui-----
  2. function createApp() {
  3. let self = this
  4. function makeSetter(val) {
  5. let setstr = 'this.' + val + '= value; this.redrawEvent();'
  6. return setstr
  7. }
  8. return {
  9. $cell: true,
  10. $type: "div",
  11. class: "propGrid max-width mdc-layout-grid mdc-layout-grid--align-left",
  12. $components: [
  13. {
  14. $cell: true,
  15. $type: "div",
  16. class: "mdc-layout-grid__inner",
  17. $components: [
  18. {
  19. $cell: true,
  20. $type: "div",
  21. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  22. $components: [
  23. {
  24. $cell: true,
  25. $type: "button",
  26. class: "mdc-button mdc-button--raised",
  27. $text: "Wide",
  28. onclick: function (e) {
  29. let avatarID = 'avatar-'+vwf.moniker_;
  30. vwf_view.kernel.callMethod(avatarID, "setBigVideoHead", []);
  31. }
  32. },
  33. {
  34. $cell: true,
  35. $type: "button",
  36. class: "mdc-button mdc-button--raised",
  37. $text: "Small",
  38. onclick: function (e) {
  39. let avatarID = 'avatar-'+vwf.moniker_;
  40. vwf_view.kernel.callMethod(avatarID, "setSmallVideoHead", []);
  41. }
  42. }
  43. ]
  44. }
  45. ]
  46. }
  47. ]
  48. }
  49. }