From 49850a02bb8684e481fc6368f9c11232d824e872 Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Sun, 1 Sep 2024 18:09:49 -0400
Subject: Added color and centering defaults to formattedtextbox

---
 .../views/nodes/DataVizBox/DocCreatorMenu.tsx      | 27 ++++++++++++----------
 1 file changed, 15 insertions(+), 12 deletions(-)

(limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx')

diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
index 0d2f4c538..fa721517b 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
@@ -1236,7 +1236,7 @@ export interface FieldOpts {
     cornerRounding?: number;
     borderWidth?: string;
     borderColor?: string;
-    contentXCentering?: 'left' | 'center' | 'right';
+    contentXCentering?: 'h-left' | 'h-center' | 'h-right';
     contentYCentering?: 'top' | 'center' | 'bottom';
     opacity?: number;
     rotation?: number;
@@ -1276,7 +1276,7 @@ export class FieldFuncs {
             borderColor: opts.borderColor,
             borderWidth: opts.borderWidth,
             opacity: opts.opacity,
-            _layout_centered: opts.contentXCentering === 'center' ? true : false,
+            hCentering: opts.contentXCentering,
             _rotation: opts.rotation,
         });
 
@@ -1302,7 +1302,7 @@ export class FieldFuncs {
             borderColor: opts.borderColor,
             borderWidth: opts.borderWidth,
             opacity: opts.opacity,
-            _layout_centered: opts.contentXCentering === 'center' ? true : false,
+            hCentering: opts.contentXCentering,
             _rotation: opts.rotation,
         });
 
@@ -1327,7 +1327,7 @@ export class FieldFuncs {
             borderColor: opts.borderColor,
             borderWidth: opts.borderWidth,
             opacity: opts.opacity,
-            _layout_centered: opts.contentXCentering === 'center' ? true : false,
+            hCentering: opts.contentXCentering,
             _rotation: opts.rotation,
         });
 
@@ -1382,7 +1382,7 @@ export class TemplateLayouts {
             opts: {
                 backgroundColor: 'transparent',
                 color: '#2DBEAD',
-                contentXCentering: 'center',
+                contentXCentering: 'h-center',
             }
         }, {
             tl: [-.87, -.83], 
@@ -1403,7 +1403,8 @@ export class TemplateLayouts {
             sizes: [FieldSize.TINY, FieldSize.SMALL],
             description: 'A caption for field #2, very short to short text that contextualizes the content of field #2',
             opts: {
-                backgroundColor: 'transparent'
+                backgroundColor: 'transparent',
+                contentXCentering: 'h-center'
             }
         }, {
             tl: [-.87, .37], 
@@ -1446,7 +1447,8 @@ export class TemplateLayouts {
             description: '',
             opts: {
                 backgroundColor: 'transparent',
-                color: 'white'
+                color: 'white',
+                contentXCentering: 'h-center'
             }
         }, {
             tl: [-.45, 0], 
@@ -1456,7 +1458,8 @@ export class TemplateLayouts {
             description: '',
             opts: {
                 backgroundColor: 'transparent',
-                color: 'white'
+                color: 'white',
+                contentXCentering: 'h-center'
             }
         }, {
             tl: [-.83, .2], 
@@ -1536,7 +1539,7 @@ export class TemplateLayouts {
             opts: {
                 backgroundColor: 'transparent',
                 color: 'white',
-                contentXCentering: 'right',
+                contentXCentering: 'h-right',
             }
         }, {
             tl: [.1, .8], 
@@ -1547,7 +1550,7 @@ export class TemplateLayouts {
             opts: {
                 backgroundColor: 'transparent',
                 color: 'white',
-                contentXCentering: 'left'
+                contentXCentering: 'h-left'
             }
         }, {
             tl: [0, -.9], 
@@ -1557,7 +1560,7 @@ export class TemplateLayouts {
             description: '',
             opts: {
                 backgroundColor: 'transparent',
-                contentXCentering: 'right'
+                contentXCentering: 'h-right'
             }
         }],
         decorations: [{
@@ -1607,7 +1610,7 @@ export class TemplateLayouts {
             description: '',
             opts: {
                 backgroundColor: 'transparent',
-                contentXCentering: 'center',
+                contentXCentering: 'h-center',
             }
         }, {
             tl: [-.95, .5], 
-- 
cgit v1.2.3-70-g09d2

