@jamesrock/rockjs 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -337,7 +337,8 @@ export class BrickMaker extends DisplayObject {
|
|
|
337
337
|
type = 'digits',
|
|
338
338
|
color = 'red',
|
|
339
339
|
scale = 30,
|
|
340
|
-
gap = 1
|
|
340
|
+
gap = 1,
|
|
341
|
+
prefix = '0x'
|
|
341
342
|
} = {}) {
|
|
342
343
|
|
|
343
344
|
super();
|
|
@@ -347,6 +348,7 @@ export class BrickMaker extends DisplayObject {
|
|
|
347
348
|
this.scale = scale;
|
|
348
349
|
this.type = type;
|
|
349
350
|
this.gap = gap;
|
|
351
|
+
this.prefix = prefix;
|
|
350
352
|
this.hexMap = size*size > 16 ? makeHexMap() : makeHexMap(false);
|
|
351
353
|
this.typeValues = {
|
|
352
354
|
'digits': makeArray(size*size, () => 1),
|
|
@@ -405,7 +407,7 @@ export class BrickMaker extends DisplayObject {
|
|
|
405
407
|
});
|
|
406
408
|
total[y] = this.hexMap[total[y]];
|
|
407
409
|
});
|
|
408
|
-
this.value =
|
|
410
|
+
this.value = `${this.prefix}${total.join('')}`;
|
|
409
411
|
break;
|
|
410
412
|
};
|
|
411
413
|
this.dispatchEvent('result');
|