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.Image = SVG.invent({
// Initialize node
create: 'image'
// Inherit from
, inherit: SVG.Shape
// Add class methods
, extend: {
// (re)load image
load: function(url) {
if (!url) return this
var self = this
, img = new window.Image()
// preload image
SVG.on(img, 'load', function() {
SVG.off(img)
var p = self.parent(SVG.Pattern)
if(p === null) return
// ensure image size
if (self.width() == 0 && self.height() == 0)
self.size(img.width, img.height)
// ensure pattern size if not set
if (p && p.width() == 0 && p.height() == 0)
p.size(self.width(), self.height())
// callback
if (typeof self._loaded === 'function')
self._loaded.call(self, {
width: img.width
, height: img.height
, ratio: img.width / img.height
, url: url
})
})
SVG.on(img, 'error', function(e){
SVG.off(img)
if (typeof self._error === 'function'){
self._error.call(self, e)
}
})
return this.attr('href', (img.src = this.src = url), SVG.xlink)
}
// Add loaded callback
, loaded: function(loaded) {
this._loaded = loaded
return this
}
, error: function(error) {
this._error = error
return this
}
}
// Add parent method
, construct: {
// create image element, load image and set its size
image: function(source, width, height) {
return this.put(new SVG.Image).load(source).size(width || 0, height || width || 0)
}
}
}) |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]-- |