|
@ -26,6 +26,7 @@ import ManipulationSystem from "./modules/ManipulationSystem"; |
|
|
import ConfigurationSystem from "./modules/ConfigurationSystem"; |
|
|
import ConfigurationSystem from "./modules/ConfigurationSystem"; |
|
|
import Validator from "./modules/Validator"; |
|
|
import Validator from "./modules/Validator"; |
|
|
import {printStyle} from "./modules/Validator"; |
|
|
import {printStyle} from "./modules/Validator"; |
|
|
|
|
|
import allOptions from './modules/components/AllOptions.js'; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @constructor Network |
|
|
* @constructor Network |
|
@ -135,7 +136,7 @@ Emitter(Network.prototype); |
|
|
Network.prototype.setOptions = function (options) { |
|
|
Network.prototype.setOptions = function (options) { |
|
|
if (options !== undefined) { |
|
|
if (options !== undefined) { |
|
|
|
|
|
|
|
|
let errorFound = Validator.validate(options); |
|
|
|
|
|
|
|
|
let errorFound = Validator.validate(options,allOptions); |
|
|
if (errorFound === true) { |
|
|
if (errorFound === true) { |
|
|
options = {}; |
|
|
options = {}; |
|
|
console.log('%cErrors have been found in the supplied options object. None of the options will be used.', printStyle); |
|
|
console.log('%cErrors have been found in the supplied options object. None of the options will be used.', printStyle); |
|
|