Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/svg.js/src/ drwxrwxr-x | |
| Viewing file: Select action/file-type: SVG.Line = SVG.invent({
// Initialize node
create: 'line'
// Inherit from
, inherit: SVG.Shape
// Add class methods
, extend: {
// Get array
array: function() {
return new SVG.PointArray([
[ this.attr('x1'), this.attr('y1') ]
, [ this.attr('x2'), this.attr('y2') ]
])
}
// Overwrite native plot() method
, plot: function(x1, y1, x2, y2) {
if (x1 == null)
return this.array()
else if (typeof y1 !== 'undefined')
x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }
else
x1 = new SVG.PointArray(x1).toLine()
return this.attr(x1)
}
// Move by left top corner
, move: function(x, y) {
return this.attr(this.array().move(x, y).toLine())
}
// Set element size to given width and height
, size: function(width, height) {
var p = proportionalSize(this, width, height)
return this.attr(this.array().size(p.width, p.height).toLine())
}
}
// Add parent method
, construct: {
// Create a line element
line: function(x1, y1, x2, y2) {
// make sure plot is called as a setter
// x1 is not necessarily a number, it can also be an array, a string and a SVG.PointArray
return SVG.Line.prototype.plot.apply(
this.put(new SVG.Line)
, x1 != null ? [x1, y1, x2, y2] : [0, 0, 0, 0]
)
}
}
})
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.005 ]-- |