Revert "Work IP"

This reverts commit 129f6693216e08d9f6641f3f5804817d25978f4c.
This commit is contained in:
Paulo Gustavo Veiga
2022-01-03 12:06:55 -08:00
parent 5d3f04fe77
commit 9be9bed811
13 changed files with 124 additions and 115 deletions

View File

@ -13,7 +13,6 @@
<td>Tahoma</td>
<td>Verdana</td>
<td>Times</td>
<td>Brush Script MT</td>
</tr>
</thead>
<tbody>
@ -33,9 +32,6 @@
<td>
<div id="multi3"></div>
</td>
<td>
<div id="multi4"></div>
</td>
</tr>
<tr>
<td>
@ -53,9 +49,6 @@
<td>
<div id="amulti3"></div>
</td>
<td>
<div id="amulti4"></div>
</td>
</tr>
<!--**************************************************************************-->
</tbody>

View File

@ -1,11 +1,11 @@
import $ from 'jquery';
import {
Workspace, Text,
Toolkit, Workspace, Text,
} from '../../src';
global.$ = $;
function multiline(text, fontName, elemId) {
function multiline(text, family, elemId) {
const workspace = new Workspace();
workspace.setSize('200px', '240px');
workspace.setCoordSize('200', '240');
@ -16,7 +16,7 @@ function multiline(text, fontName, elemId) {
workspace.append(wText);
wText.setText(text);
wText.setFont(fontName, size, 'bold');
wText.setFont(family, size, 'bold');
wText.setPosition(30, 50 * i);
wText.setColor('blue');
});
@ -45,11 +45,11 @@ function alignments(text, family, elemId) {
}
// Multine tests ...
['Arial', 'Tahoma', 'Verdana', 'Times', 'Brush Script MT'].forEach((fontName, i) => {
multiline('This multine text.\nLine 1 :)\nLine2', fontName, `multi${i}`);
['Arial', 'Tahoma', 'Verdana', 'Times'].forEach((family, i) => {
multiline('This multine text.\nLine 1 :)\nLine2', family, `multi${i}`);
});
// Multine tests and alingments .. ...
['Arial', 'Tahoma', 'Verdana', 'Times', 'Brush Script MT'].forEach((fontName, i) => {
alignments('This multine text.\nThis is the long line just because :)\nShort line', fontName, `amulti${i}`);
['Arial', 'Tahoma', 'Verdana', 'Times'].forEach((family, i) => {
alignments('This multine text.\nThis is the long line just because :)\nShort line', family, `amulti${i}`);
});

View File

@ -18,7 +18,7 @@ const textTestHelper = function textTestHelper(coordSize, textval, font, fontSiz
const workspace = new Workspace();
workspace.setSize('300px', '100px');
workspace.setCoordSize(coordSize, coordSize);
workspace.setCoordSize('coordSize', coordSize);
workspace.setCoordOrigin(0, 0);
workspace.addItAsChildTo($(`#${htmlElemId}`));
@ -36,7 +36,7 @@ const textTestHelper = function textTestHelper(coordSize, textval, font, fontSiz
span.setAttribute('id', `textoHTML${iesimo}`);
const textsize = `${textval} - Scale: ${scale.height}`;
const textHtml = document.createTextNode(textsize);
const fontSize = text.getHtmlFontSize(textsize);
const fontSize = text.getHtmlFontSize();
span.append(textHtml);
span.setAttribute('style', `font-weight:${modifier};font-style: ${style}; font-size:${fontSize}pt; font-family: ${font};width:30;height:30;`);