DrawingScene.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * ********************************************************************************************************************
  3. *
  4. * :*$@@%$*: ;: ;; ;;
  5. * :@@%! :!@@%: %! ;%%@@%$ =@@@@@@@%; @%@@@%%%%@@@@@
  6. * :@%; :$= %%$$$%$$ ;$$ ;$@= !@$
  7. * =@! %! @ $=;% !@@@%: !$$$$$$$$$$$$$$=
  8. * =@* %! @ $= % %@= =%@! %=
  9. * *$%%! @@= ;=$%%%$*: %! @ $= % =%%%%%%@$ *%: =%
  10. * %@@!: !@@@%=$@@@@%! :*@@$: %! @ $= % $* ;@ @* :%*
  11. * ;@@! ;!!!;: ;@%: =======@%========* @ $$ % $%*****$@ :@$=*********=@$
  12. * $@* ;@@@%=!: *@*
  13. * =@$ ;;;!=%@@@@=! =@!
  14. * %@$: =@%: :*@@@* %@= Copyright (c) 2016-2019. 北京上格云技术有限公司
  15. * ;%@@$=$@@%* *@@@$=%@@%;
  16. * ::;:: ::;:: All rights reserved.
  17. *
  18. * ********************************************************************************************************************
  19. */
  20. import { SGraphScene } from "@saga-web/graph/lib";
  21. import { SMouseEvent } from "@saga-web/base/lib";
  22. /**
  23. * 在线绘图
  24. *
  25. * @author 郝建龙
  26. */
  27. export class DrawingScene extends SGraphScene {
  28. /** 画布状态 */
  29. sceneStatus: DrawStatus = DrawStatus.None;
  30. /**
  31. * 鼠标按下事件
  32. *
  33. * @param event 保存事件参数
  34. * @return boolean
  35. */
  36. onMouseDown(event: SMouseEvent): boolean {
  37. switch (this.sceneStatus) {
  38. case DrawStatus.None:
  39. console.log(0);
  40. break;
  41. case DrawStatus.LINE:
  42. break;
  43. case DrawStatus.CIRCLE:
  44. break;
  45. case DrawStatus.RECT:
  46. break;
  47. default:
  48. break;
  49. }
  50. return true;
  51. } // Function onMouseDown()
  52. /**
  53. * 鼠标抬起事件
  54. *
  55. * @param event 保存事件参数
  56. * @return boolean
  57. */
  58. onMouseUp(event: SMouseEvent): boolean {
  59. return false;
  60. } // Function onMouseUp()
  61. /**
  62. * 鼠标移动事件
  63. *
  64. * @param event 鼠标事件对象
  65. */
  66. onMouseMove(event: SMouseEvent): boolean {
  67. return false;
  68. } // Function onMouseMove()
  69. } // Class DrawingScene