Abstract.js 812 B

1234567891011121314151617181920212223242526272829
  1. Ext.define(null, {
  2. override: 'Ext.ux.gauge.needle.Abstract',
  3. compatibility: Ext.isIE10p,
  4. setTransform: function(centerX, centerY, rotation) {
  5. var needleGroup = this.getNeedleGroup();
  6. this.callParent([centerX, centerY, rotation]);
  7. needleGroup.set({
  8. transform: getComputedStyle(needleGroup.dom).getPropertyValue('transform')
  9. });
  10. },
  11. updateStyle: function(style) {
  12. var pathElement;
  13. this.callParent([style]);
  14. if (Ext.isObject(style) && 'transform' in style) {
  15. pathElement = this.getNeedlePath();
  16. pathElement.set({
  17. transform: getComputedStyle(pathElement.dom).getPropertyValue('transform')
  18. });
  19. }
  20. }
  21. });