Changeset c6b84df for public/vendors/charts/apex/apexcharts.esm.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.esm.js
r6b95845 rc6b84df 23304 23304 // ensure the presence of a dom element 23305 23305 element = typeof element === 'string' ? document.getElementById(element) : element; // If the target is an svg element, use that element as the main wrapper. 23306 // This allows svg.js to work with svg documents as well.23306 // This allows svg.js to work with svg folders as well. 23307 23307 23308 23308 if (element.nodeName == 'svg') { … … 26209 26209 return this.p.matrixTransform(this.m) 26210 26210 }; 26211 26211 26212 26212 // gets elements bounding box with special handling of groups, nested and use 26213 26213 DragHandler.prototype.getBBox = function(){ … … 26216 26216 26217 26217 if(this.el instanceof SVG.Nested) box = this.el.rbox(); 26218 26218 26219 26219 if (this.el instanceof SVG.G || this.el instanceof SVG.Use || this.el instanceof SVG.Nested) { 26220 26220 box.x = this.el.x(); … … 26234 26234 } 26235 26235 } 26236 26236 26237 26237 var _this = this; 26238 26238 … … 26249 26249 26250 26250 var box = this.getBBox(); 26251 26251 26252 26252 var anchorOffset; 26253 26253 26254 26254 // fix text-anchor in text-element (#37) 26255 26255 if(this.el instanceof SVG.Text){ 26256 26256 anchorOffset = this.el.node.getComputedTextLength(); 26257 26257 26258 26258 switch(this.el.attr('text-anchor')){ 26259 26259 case 'middle': … … 26265 26265 } 26266 26266 } 26267 26267 26268 26268 this.startPoints = { 26269 26269 // We take absolute coordinates since we are just using a delta here … … 26272 26272 transform: this.el.transform() 26273 26273 }; 26274 26274 26275 26275 // add drag and end events to window 26276 26276 SVG.on(window, 'mousemove.drag', function(e){ _this.drag(e); }); … … 26299 26299 , gx = p.x - this.startPoints.point.x 26300 26300 , gy = p.y - this.startPoints.point.y; 26301 26301 26302 26302 var event = new CustomEvent('dragmove', { 26303 26303 detail: { … … 26309 26309 , cancelable: true 26310 26310 }); 26311 26311 26312 26312 this.el.fire(event); 26313 26313 26314 26314 if(event.defaultPrevented) return p 26315 26315 … … 26351 26351 else if (c.maxY != null && y > c.maxY - box.height) 26352 26352 y = c.maxY - box.height; 26353 26353 26354 26354 if(this.el instanceof SVG.G) 26355 26355 this.el.matrix(this.startPoints.transform).transform({x:gx, y: gy}, true); … … 26357 26357 this.el.move(x, y); 26358 26358 } 26359 26359 26360 26360 // so we can use it in the end-method, too 26361 26361 return p
Note:
See TracChangeset
for help on using the changeset viewer.