Server IP : 85.214.239.14 / Your IP : 18.117.230.176 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/task/2/cwd/proc/3/cwd/proc/3/cwd/lib/node_modules/pm2/node_modules/pm2-multimeter/ |
Upload File : |
var charmer = require('charm'); var Bar = require('./lib/bar'); var exports = module.exports = function (c) { if (c instanceof charmer.Charm) { var charm = c; } else { var charm = charmer.apply(null, arguments); charm.on('^C', function () { charm.destroy(); }); } var multi = function (x, y, params) { if (typeof x === 'object') { params = x; x = params.x; y = params.y; } if (!params) params = {}; if (x === undefined) x = '+0'; if (y === undefined) y = '+0'; var bar = new Bar(charm, x, y, params); multi.bars.push(bar); bar.offset = multi.offset; multi.on('offset', function (o) { bar.offset = o; }); return bar; }; multi.bars = []; multi.rel = function (x, y, params) { return multi(x, '-' + y, params); }; multi.drop = function (params, cb) { if (!cb) { cb = params; params = {} } charm.position(function (x, y) { var bar = new Bar(charm, x, y, params); multi.bars.push(bar); multi.on('offset', function (o) { bar.offset = o; }); cb(bar); }); }; multi.charm = charm; charm.setMaxListeners(0); multi.destroy = charm.destroy.bind(charm); multi.on = charm.on.bind(charm); multi.emit = charm.emit.bind(charm); multi.removeListener = charm.removeListener.bind(charm); multi.write = charm.write.bind(charm); (function () { var offset = 0; Object.defineProperty(multi, 'offset', { set : function (o) { offset = o; multi.emit('offset', o); }, get : function () { return offset; } }); })(); return multi; };