@aurigma/design-atoms-text
Advanced tools
Comparing version 6.20.1 to 6.20.2
import { Exception } from "@aurigma/design-atoms-model/Exception"; | ||
import { Color } from "@aurigma/design-atoms-model/Colors"; | ||
import { Text } from "../../Model"; | ||
@@ -179,2 +180,14 @@ import { GmXmlParser, GmXmlSerializer } from "../../Serialization"; | ||
text = new GmXmlSerializer().serialize(textModel, colorPalette); | ||
let i = 0; | ||
while (true) { | ||
if (!colorPalette.containsColorWithIndex(i)) | ||
break; | ||
let paletteColor = colorPalette.getColorByIndex(i); | ||
let existingColor = this.colorPalette.getPaletteColorAt(i); | ||
if (existingColor == null) | ||
this.colorPalette.addColorToPalette(paletteColor); | ||
else if (!Color.equals(existingColor, paletteColor)) | ||
console.warn(`differentColors: existingColor ${existingColor}; paletteColor ${paletteColor}`); | ||
i++; | ||
} | ||
this._textHandler.insertFormattedText(text); | ||
@@ -181,0 +194,0 @@ } |
{ | ||
"name": "@aurigma/design-atoms-text", | ||
"version": "6.20.1", | ||
"version": "6.20.2", | ||
"description": "", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@aurigma/design-atoms-model": "6.5.29", | ||
"@aurigma/design-atoms-model": "6.5.30", | ||
"@aurigma/text-whizz": "1.5.58", | ||
@@ -40,0 +40,0 @@ "xmldom": "^0.6.0" |
import {Exception} from "@aurigma/design-atoms-model/Exception"; | ||
import {Color} from "@aurigma/design-atoms-model/Colors"; | ||
import TextWhizz from "@aurigma/text-whizz/TextWhizzJS"; | ||
@@ -236,2 +237,16 @@ import {Text} from "../../Model"; | ||
text = new GmXmlSerializer().serialize(textModel, colorPalette); | ||
let i = 0; | ||
while(true){ | ||
if (!colorPalette.containsColorWithIndex(i)) | ||
break; | ||
let paletteColor = colorPalette.getColorByIndex(i); | ||
let existingColor = this.colorPalette.getPaletteColorAt(i); | ||
if (existingColor == null) | ||
this.colorPalette.addColorToPalette(paletteColor); | ||
else if (!Color.equals(existingColor, paletteColor)) | ||
console.warn(`differentColors: existingColor ${existingColor}; paletteColor ${paletteColor}`); | ||
i++; | ||
} | ||
this._textHandler.insertFormattedText(text); | ||
@@ -238,0 +253,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
851177
20957