Skip to content

Commit

Permalink
v23.1.43 is released
Browse files Browse the repository at this point in the history
  • Loading branch information
pipeline committed Oct 31, 2023
1 parent 0bc0749 commit 23fb3e9
Show file tree
Hide file tree
Showing 37,002 changed files with 1,925 additions and 6,609,224 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions controls/barcodegenerator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## [Unreleased]

## 23.1.43 (2023-10-31)

### Barcode

#### Bug Fixes

- `#I508544` - Now, the DataMatrix barcode is rendered properly with alphanumeric values.

## 19.1.63 (2021-05-13)

### Barcode
Expand Down
6 changes: 4 additions & 2 deletions controls/barcodegenerator/spec/datamatrix/datamatrix.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,8 @@ describe('Barcode Control ', () => {

it('renderin', (done: Function) => {
var children = document.getElementById('barcode').children[0]
expect(Math.round(Number(children.children[10].getAttribute("x"))) == 100 && Math.round(Number(children.children[10].getAttribute("y"))) == 19 && Math.round(Number(children.children[100].getAttribute("x"))) == 69 && Math.round(Number(children.children[100].getAttribute("y"))) == 66 && ((children.children[10].getAttribute("fill"))) == "black").toBe(true);
expect(Math.round(Number(children.children[10].getAttribute("x"))) == 100 && Math.round(Number(children.children[10].getAttribute("y"))) == 19 && (Math.round(Number(children.children[100].getAttribute("x"))) == 69 || Math.ceil(Number(children.children[100].getAttribute("x"))) == 166 ) &&
(Math.round(Number(children.children[100].getAttribute("y"))) == 66 || Math.ceil(Number(children.children[100].getAttribute("y"))) == 57)&& ((children.children[10].getAttribute("fill"))) == "black").toBe(true);
output(children); done();
});
});
Expand Down Expand Up @@ -1458,7 +1459,8 @@ describe('Barcode Control ', () => {

it('renderin', (done: Function) => {
var children = document.getElementById('barcode').children[0]
expect(Math.round(Number(children.children[10].getAttribute("x"))) == 149 && Math.round(Number(children.children[10].getAttribute("y"))) == 17 && Math.round(Number(children.children[100].getAttribute("x"))) == 107 && Math.round(Number(children.children[100].getAttribute("y"))) == 72 && ((children.children[10].getAttribute("fill"))) == "black").toBe(true);
expect(Math.round(Number(children.children[10].getAttribute("x"))) == 149 && Math.round(Number(children.children[10].getAttribute("y"))) == 17 &&
(Math.round(Number(children.children[100].getAttribute("x"))) == 107 || Math.ceil(Number(children.children[100].getAttribute("x"))) == 38 )&& (Math.round(Number(children.children[100].getAttribute("y"))) == 72 || Math.ceil(Number(children.children[100].getAttribute("y"))) == 80) && ((children.children[10].getAttribute("fill"))) == "black").toBe(true);
output(children); done();
});
});
Expand Down
21 changes: 15 additions & 6 deletions controls/barcodegenerator/src/datamatrix/datamatrix-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class DataMatrix {


private DataMatrixEncoder(dataCodeword: number[]): number[] {
const result: number[] = dataCodeword;
const result: number[] = new Array(dataCodeword.length);
let index: number = 0;
for (let i: number = 0; i < dataCodeword.length; i++) {
//checks the codeword is digit or not.
Expand All @@ -174,21 +174,30 @@ export class DataMatrix {
//Check the prevValue is digit or non convertable value
//if it is true ,then combine the 2 digits
if (priorValue !== 235 && prevValue >= 48 && prevValue <= 57) {
result[parseInt(prevIndex.toString(), 10)] = (10 * (prevValue - 0) + (dataCodeword[parseInt(i.toString(), 10)] - 0) + 130);
//Bug 851922: DataMatrix barcode not working for alphanumeric value
// Modified (prevValue - 0) into (prevValue - 48) for proper calculation as the '0' corresponds to the decimal value 48 in the ASCII table.
result[parseInt(prevIndex.toString(), 10)] = (10 * (prevValue - 48) + (dataCodeword[parseInt(i.toString(), 10)] - 48) + 130);

} else {
result[index++] = (dataCodeword[parseInt(i.toString(), 10)] + 1);
result[parseInt(index.toString(), 10)] = (dataCodeword[parseInt(i.toString(), 10)] + 1);
index++;
}
} else if (dataCodeword[parseInt(i.toString(), 10)] < 127) {
result[index++] = (dataCodeword[parseInt(i.toString(), 10)] + 1);
result[parseInt(index.toString(), 10)] = (dataCodeword[parseInt(i.toString(), 10)] + 1);
index++;
} else {
result[parseInt(index.toString(), 10)] = 235;
result[index++] = (((dataCodeword[parseInt(i.toString(), 10)] - 127)));
result[parseInt(index.toString(), 10)] = (((dataCodeword[parseInt(i.toString(), 10)] - 127)));
index++;
}
}
let encodedData: number[] = Array(index);
encodedData = this.fillZero(encodedData);
encodedData = result;
//Bug 851922: DataMatrix barcode not working for alphanumeric value
// Modified the "encodedData = result" code into below for proper assignement of value from result to encodedData.
for (let i :number = 0; i < index; i++) {
encodedData[parseInt(i.toString(), 10)] = result[parseInt(i.toString(), 10)];
}
return encodedData;
}

Expand Down
178 changes: 0 additions & 178 deletions controls/barcodegenerator/themestudio/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions controls/barcodegenerator/themestudio/src/README.md

This file was deleted.

67,620 changes: 0 additions & 67,620 deletions controls/barcodegenerator/themestudio/src/wwwroot/ej2-resource/styles/allfusion.scss

This file was deleted.

Loading

0 comments on commit 23fb3e9

Please sign in to comment.