unitGroup.vwf.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ---
  2. extends: http://vwf.example.com/kinetic/group.vwf
  3. properties:
  4. supportMouseEvents: true
  5. supportTouchEvents: true
  6. mapPosition:
  7. set: |
  8. if ( value !== undefined ) {
  9. this.mapPosition = value;
  10. if ( this.icon && this.icon.symbolCenter ) {
  11. this.position = {
  12. "x": this.mapPosition.x - this.icon.symbolCenter.x,
  13. "y": this.mapPosition.y - this.icon.symbolCenter.y
  14. };
  15. } else {
  16. this.position = value;
  17. }
  18. }
  19. value: { "x": 0, "y": 0 }
  20. threatShape:
  21. set: |
  22. if ( this.threatShape !== value ) {
  23. this.threatShape = value;
  24. this.updateThreatShape();
  25. }
  26. value: "circle"
  27. showThreat:
  28. set: |
  29. if ( this.threatArea !== undefined ) {
  30. this.threatArea.visible = value;
  31. }
  32. get: |
  33. if ( this.threatArea !== undefined ) {
  34. return this.threatArea.visible;
  35. }
  36. return false;
  37. value: false
  38. showBorder:
  39. set: |
  40. if ( this.border !== undefined ) {
  41. this.border.visible = value;
  42. }
  43. get: |
  44. if ( this.border !== undefined ) {
  45. return this.border.visible;
  46. }
  47. return false;
  48. value: false
  49. methods:
  50. updateThreatShape:
  51. handleRender:
  52. events:
  53. threatShapeChanged:
  54. scripts:
  55. - source: "unitGroup.js"