MCPcopy
hub / github.com/viliusle/miniPaint / getParams

Method getParams

src/js/core/base-tools.js:282–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

280 }
281
282 getParams() {
283 const params = {};
284 // Number inputs return the .value if defined as objects.
285 for (let attributeName in config.TOOL.attributes) {
286 const attribute = config.TOOL.attributes[attributeName];
287 if (!isNaN(attribute.value) && attribute.value != null) {
288 if (typeof attribute.value === 'string') {
289 params[attributeName] = attribute;
290 } else {
291 params[attributeName] = attribute.value;
292 }
293 } else {
294 params[attributeName] = attribute;
295 }
296 }
297 return params;
298 }
299
300 adaptSize(value, type = "width") {
301 var response;

Callers 15

get_params_hashMethod · 0.95
shape_mousedownMethod · 0.95
shape_mousemoveMethod · 0.95
shape_mouseupMethod · 0.95
calc_snap_positionMethod · 0.95
fillMethod · 0.80
mousedownMethod · 0.80
mousemoveMethod · 0.80
mouseupMethod · 0.80
default_dragMoveMethod · 0.80
mousedownMethod · 0.80
default_dragMoveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected