mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
Fix docblocks
This commit is contained in:
parent
e53e599f1b
commit
d598ee34bd
|
|
@ -124,7 +124,7 @@
|
||||||
inherited : false,
|
inherited : false,
|
||||||
|
|
||||||
clone : function( index ) {
|
clone : function( index ) {
|
||||||
var cloned = {
|
const cloned = {
|
||||||
index : ( typeof index === 'number' ? index : this.index ),
|
index : ( typeof index === 'number' ? index : this.index ),
|
||||||
name : this.name,
|
name : this.name,
|
||||||
mtllib : this.mtllib,
|
mtllib : this.mtllib,
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
.datum(format);
|
.datum(format);
|
||||||
|
|
||||||
rect.append("title")
|
rect.append("title")
|
||||||
.text(function(d) { return; });
|
.text(function(d) { });
|
||||||
|
|
||||||
svg.selectAll(".month")
|
svg.selectAll(".month")
|
||||||
.data(function(d) { return d3.time.months(new Date(parseInt(d.name), 0, 1), new Date(parseInt(d.name) + 1, 0, 1)); })
|
.data(function(d) { return d3.time.months(new Date(parseInt(d.name), 0, 1), new Date(parseInt(d.name) + 1, 0, 1)); })
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,10 @@
|
||||||
jsOMS.Chart.ChartAbstract.prototype.findAxisDomain = function ()
|
jsOMS.Chart.ChartAbstract.prototype.findAxisDomain = function ()
|
||||||
{
|
{
|
||||||
for (let id in this.axis) {
|
for (let id in this.axis) {
|
||||||
|
if(!this.axis.hasOwnProperty(id)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
this.axis[id].max = d3.max(this.dataset, function (m)
|
this.axis[id].max = d3.max(this.dataset, function (m)
|
||||||
{
|
{
|
||||||
return d3.max(m.points, function (d)
|
return d3.max(m.points, function (d)
|
||||||
|
|
@ -528,7 +532,7 @@
|
||||||
0,
|
0,
|
||||||
this.dimension.height
|
this.dimension.height
|
||||||
- this.margin.top
|
- this.margin.top
|
||||||
- this.margin.bottom,
|
- this.margin.bottom
|
||||||
], 0.3);
|
], 0.3);
|
||||||
} else {
|
} else {
|
||||||
return d3.scale.linear().range([
|
return d3.scale.linear().range([
|
||||||
|
|
@ -586,7 +590,7 @@
|
||||||
|
|
||||||
jsOMS.Chart.ChartAbstract.prototype.calculateDimension = function ()
|
jsOMS.Chart.ChartAbstract.prototype.calculateDimension = function ()
|
||||||
{
|
{
|
||||||
let box = this.chartSelect.node().getBoundingClientRect()
|
let box = this.chartSelect.node().getBoundingClientRect();
|
||||||
|
|
||||||
this.dimension = {
|
this.dimension = {
|
||||||
width: box.width,
|
width: box.width,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*/
|
*/
|
||||||
jsOMS.Config.Options.prototype.set = function (key, value, overwrite)
|
jsOMS.Config.Options.prototype.set = function (key, value, overwrite)
|
||||||
{
|
{
|
||||||
overwrite = typeof overwrite === 'bool' ? overwrite : false;
|
overwrite = typeof overwrite === 'undefined' ? overwrite : false;
|
||||||
|
|
||||||
if (overwrite || typeof this.options[key] === 'undefined') {
|
if (overwrite || typeof this.options[key] === 'undefined') {
|
||||||
this.options[key] = value;
|
this.options[key] = value;
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
* Executes the callback specified for this group if all events are finished
|
* Executes the callback specified for this group if all events are finished
|
||||||
*
|
*
|
||||||
* @param {string|int} group Group id
|
* @param {string|int} group Group id
|
||||||
* @param {string|int} id Event id
|
* @param {string|int} [id] Event id
|
||||||
* @param {Object} [data] Data for event
|
* @param {Object} [data] Data for event
|
||||||
*
|
*
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
|
|
@ -153,8 +153,8 @@
|
||||||
*
|
*
|
||||||
* @param {string|int} group Group id
|
* @param {string|int} group Group id
|
||||||
* @param {function} callback Callback
|
* @param {function} callback Callback
|
||||||
* @param {boolean} remove Should be removed after execution
|
* @param {boolean} [remove] Should be removed after execution
|
||||||
* @param {boolean} reset Reset after triggering
|
* @param {boolean} [reset] Reset after triggering
|
||||||
*
|
*
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,7 @@
|
||||||
{
|
{
|
||||||
context = typeof context === 'undefined' ? {} : context;
|
context = typeof context === 'undefined' ? {} : context;
|
||||||
|
|
||||||
this.write(message, context, context);
|
this.write(message, context, level);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,6 @@ with ({p: MathProcessor.prototype}) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
p.error = function (s) {
|
p.error = function (s) {
|
||||||
return;
|
|
||||||
//throw new Error("MathProcessor: " + (s || "Wrong expression"));
|
//throw new Error("MathProcessor: " + (s || "Wrong expression"));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
jsOMS.Message.Notification.App.AppNotification.prototype.setStatus = function(status)
|
jsOMS.Message.Notification.App.AppNotification.prototype.setStatus = function(status)
|
||||||
{
|
{
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
};
|
||||||
|
|
||||||
jsOMS.Message.Notification.App.AppNotification.prototype.requestPermission = function()
|
jsOMS.Message.Notification.App.AppNotification.prototype.requestPermission = function()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
jsOMS.Message.Notification.Browser.BrowserNotification.prototype.setStatus = function(status)
|
jsOMS.Message.Notification.Browser.BrowserNotification.prototype.setStatus = function(status)
|
||||||
{
|
{
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
};
|
||||||
|
|
||||||
jsOMS.Message.Notification.Browser.BrowserNotification.prototype.requestPermission = function()
|
jsOMS.Message.Notification.Browser.BrowserNotification.prototype.requestPermission = function()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,6 @@
|
||||||
|
|
||||||
jsOMS.Message.Notification.NotificationType = Object.freeze({
|
jsOMS.Message.Notification.NotificationType = Object.freeze({
|
||||||
APP_NOTIFICATION: 1,
|
APP_NOTIFICATION: 1,
|
||||||
BROWSER_NOTIFICATION: 2,
|
BROWSER_NOTIFICATION: 2
|
||||||
});
|
});
|
||||||
}(window.jsOMS = window.jsOMS || {}));
|
}(window.jsOMS = window.jsOMS || {}));
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@
|
||||||
IE: 'msie',
|
IE: 'msie',
|
||||||
EDGE: 'edge',
|
EDGE: 'edge',
|
||||||
CHROME: 'chrome',
|
CHROME: 'chrome',
|
||||||
BLINK: 'blink',
|
BLINK: 'blink'
|
||||||
});
|
});
|
||||||
}(window.jsOMS = window.jsOMS || {}));
|
}(window.jsOMS = window.jsOMS || {}));
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
*
|
*
|
||||||
* @param {string} key Response key
|
* @param {string} key Response key
|
||||||
* @param {Array|Object} data Date to use in callback
|
* @param {Array|Object} data Date to use in callback
|
||||||
* @param {string} [request] Request id for request specific execution
|
* @param {jsOMS.Message.Request.Request} [request] Request id for request specific execution
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
/**
|
/**
|
||||||
* Bind DOM elment
|
* Bind DOM elment
|
||||||
*
|
*
|
||||||
* @param {Object} id DOM elment
|
* @param {string} id DOM elment
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -83,24 +83,22 @@
|
||||||
jsOMS.preventAll(event);
|
jsOMS.preventAll(event);
|
||||||
|
|
||||||
if (elapsedTime > 300 && distY < 3 && distX < 3) {
|
if (elapsedTime > 300 && distY < 3 && distX < 3) {
|
||||||
let rightClick = document.createEvent('MouseEvents');
|
let rightClick = MouseEvent('click',
|
||||||
|
{
|
||||||
rightClick.initMouseEvent(
|
bubbles: true,
|
||||||
'click',
|
cancelable: true,
|
||||||
true, // canBubble
|
view: window,
|
||||||
true, // cancelable
|
screenX: touch.pageX,
|
||||||
window, // view - set to the window object
|
screenY: touch.pageY,
|
||||||
1, // detail - # of mouse clicks
|
clientX: touch.pageX,
|
||||||
touch.pageX, // screenX - the page X coordinate
|
clientY: touch.pageY,
|
||||||
touch.pageY, // screenY - the page Y coordinate
|
ctrlKey: false,
|
||||||
touch.pageX, // clientX - the window X coordinate
|
altKey: false,
|
||||||
touch.pageY, // clientY - the window Y coordinate
|
shiftKey: false,
|
||||||
false, // ctrlKey
|
metaKey: false,
|
||||||
false, // altKey
|
button: 2,
|
||||||
false, // shiftKey
|
relatedTarget: null
|
||||||
false, // metaKey
|
}
|
||||||
2, // button - 1 = left, 2 = right
|
|
||||||
null // relatedTarget
|
|
||||||
);
|
);
|
||||||
|
|
||||||
document.dispatchEvent(rightClick);
|
document.dispatchEvent(rightClick);
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
/**
|
/**
|
||||||
* Get supported voices.
|
* Get supported voices.
|
||||||
*
|
*
|
||||||
* @return {array}
|
* @return {Array}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
this.recognition.grammars = this.speechRecognitionList;
|
this.recognition.grammars = this.speechRecognitionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.recognition.onstart = function() {}
|
this.recognition.onstart = function() {};
|
||||||
|
|
||||||
this.recognition.onresult = function(event) {
|
this.recognition.onresult = function(event) {
|
||||||
let result = jsOMS.trim(event.results[event.resultIndex][0].transcript);
|
let result = jsOMS.trim(event.results[event.resultIndex][0].transcript);
|
||||||
|
|
@ -82,18 +82,18 @@
|
||||||
console.log('found');
|
console.log('found');
|
||||||
self.commands[result]();
|
self.commands[result]();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
this.recognition.onspeechend = function() {
|
this.recognition.onspeechend = function() {
|
||||||
}
|
};
|
||||||
|
|
||||||
this.recognition.onnomatch = function(event) {
|
this.recognition.onnomatch = function(event) {
|
||||||
jsOMS.Log.Logger.instance.warning('Couldn\'t recognize speech');
|
jsOMS.Log.Logger.instance.warning('Couldn\'t recognize speech');
|
||||||
}
|
};
|
||||||
|
|
||||||
this.recognition.onerror = function(event) {
|
this.recognition.onerror = function(event) {
|
||||||
jsOMS.Log.Logger.instance.warning('Error during speech recognition: ' + event.error);
|
jsOMS.Log.Logger.instance.warning('Error during speech recognition: ' + event.error);
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
* Add command/grammar and callback.
|
* Add command/grammar and callback.
|
||||||
*
|
*
|
||||||
* @param {string} command Command id
|
* @param {string} command Command id
|
||||||
* @param {Callback} callback Callback for command
|
* @param {callback} callback Callback for command
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,10 @@
|
||||||
keyValPairs = query.split('&');
|
keyValPairs = query.split('&');
|
||||||
|
|
||||||
for (pairNum in keyValPairs) {
|
for (pairNum in keyValPairs) {
|
||||||
|
if(!keyValPairs.hasOwnProperty(pairNum)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const key = keyValPairs[pairNum].split('=')[0];
|
const key = keyValPairs[pairNum].split('=')[0];
|
||||||
|
|
||||||
if (!key.length) {
|
if (!key.length) {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
* @param {Object} data Object
|
* @param {Object} data Object
|
||||||
* @param {string} delim Path delimiter
|
* @param {string} delim Path delimiter
|
||||||
*
|
*
|
||||||
* @return {mixed}
|
* @return
|
||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
|
|
@ -31,6 +31,10 @@
|
||||||
let current = data;
|
let current = data;
|
||||||
|
|
||||||
for(let key in pathParts) {
|
for(let key in pathParts) {
|
||||||
|
if(!pathParts.hasOwnProperty(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(current === null) {
|
if(current === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
* @param {Object} data Object
|
* @param {Object} data Object
|
||||||
* @param {string} delim Path delimiter
|
* @param {string} delim Path delimiter
|
||||||
*
|
*
|
||||||
* @return {mixed}
|
* @return
|
||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
|
|
@ -31,6 +31,10 @@
|
||||||
let current = data;
|
let current = data;
|
||||||
|
|
||||||
for(let key in pathParts) {
|
for(let key in pathParts) {
|
||||||
|
if(!pathParts.hasOwnProperty(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(current === null) {
|
if(current === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user