Changeset c6b84df for public/vendors/charts/apex/apexcharts.common.js
- Timestamp:
- 10/21/21 23:45:59 (3 years ago)
- Branches:
- develop, master
- Children:
- 4b7e2d3
- Parents:
- 6b95845
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
public/vendors/charts/apex/apexcharts.common.js
r6b95845 rc6b84df 23306 23306 // ensure the presence of a dom element 23307 23307 element = typeof element === 'string' ? document.getElementById(element) : element; // If the target is an svg element, use that element as the main wrapper. 23308 // This allows svg.js to work with svg documents as well.23308 // This allows svg.js to work with svg folders as well. 23309 23309 23310 23310 if (element.nodeName == 'svg') { … … 26211 26211 return this.p.matrixTransform(this.m) 26212 26212 }; 26213 26213 26214 26214 // gets elements bounding box with special handling of groups, nested and use 26215 26215 DragHandler.prototype.getBBox = function(){ … … 26218 26218 26219 26219 if(this.el instanceof SVG.Nested) box = this.el.rbox(); 26220 26220 26221 26221 if (this.el instanceof SVG.G || this.el instanceof SVG.Use || this.el instanceof SVG.Nested) { 26222 26222 box.x = this.el.x(); … … 26236 26236 } 26237 26237 } 26238 26238 26239 26239 var _this = this; 26240 26240 … … 26251 26251 26252 26252 var box = this.getBBox(); 26253 26253 26254 26254 var anchorOffset; 26255 26255 26256 26256 // fix text-anchor in text-element (#37) 26257 26257 if(this.el instanceof SVG.Text){ 26258 26258 anchorOffset = this.el.node.getComputedTextLength(); 26259 26259 26260 26260 switch(this.el.attr('text-anchor')){ 26261 26261 case 'middle': … … 26267 26267 } 26268 26268 } 26269 26269 26270 26270 this.startPoints = { 26271 26271 // We take absolute coordinates since we are just using a delta here … … 26274 26274 transform: this.el.transform() 26275 26275 }; 26276 26276 26277 26277 // add drag and end events to window 26278 26278 SVG.on(window, 'mousemove.drag', function(e){ _this.drag(e); }); … … 26301 26301 , gx = p.x - this.startPoints.point.x 26302 26302 , gy = p.y - this.startPoints.point.y; 26303 26303 26304 26304 var event = new CustomEvent('dragmove', { 26305 26305 detail: { … … 26311 26311 , cancelable: true 26312 26312 }); 26313 26313 26314 26314 this.el.fire(event); 26315 26315 26316 26316 if(event.defaultPrevented) return p 26317 26317 … … 26353 26353 else if (c.maxY != null && y > c.maxY - box.height) 26354 26354 y = c.maxY - box.height; 26355 26355 26356 26356 if(this.el instanceof SVG.G) 26357 26357 this.el.matrix(this.startPoints.transform).transform({x:gx, y: gy}, true); … … 26359 26359 this.el.move(x, y); 26360 26360 } 26361 26361 26362 26362 // so we can use it in the end-method, too 26363 26363 return p
Note:
See TracChangeset
for help on using the changeset viewer.