From d5dc7be1820fcc762df206adbe855cbb9503a2dc Mon Sep 17 00:00:00 2001 From: piemontez Date: Fri, 3 May 2024 18:04:12 -0300 Subject: [PATCH] estilo node nav bar --- src/ide/assets/fontawasome.library.ts | 4 ++ .../components/NodeComponent/NodeDisplay.tsx | 5 +- src/ide/components/NodeComponent/NodeTab.tsx | 57 ++++++++++--------- 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/ide/assets/fontawasome.library.ts b/src/ide/assets/fontawasome.library.ts index 26b1250..63a3f70 100644 --- a/src/ide/assets/fontawasome.library.ts +++ b/src/ide/assets/fontawasome.library.ts @@ -2,10 +2,12 @@ import { library } from '@fortawesome/fontawesome-svg-core'; import { faAnglesLeft, faAnglesRight, + faBars, faEye, faEyeSlash, faFile, faFolderOpen, + faMagnifyingGlass, faMoon, faPlayCircle, faPlus, @@ -39,4 +41,6 @@ library.add( faEye, faEyeSlash, faSearch, + faBars, + faMagnifyingGlass, ); diff --git a/src/ide/components/NodeComponent/NodeDisplay.tsx b/src/ide/components/NodeComponent/NodeDisplay.tsx index 4ce085c..3bb38f4 100644 --- a/src/ide/components/NodeComponent/NodeDisplay.tsx +++ b/src/ide/components/NodeComponent/NodeDisplay.tsx @@ -36,10 +36,11 @@ export const NodeZoom = ({ marginLeft: 150 + pos.mx * pos.canvasScale, top: 20 + pos.my * pos.canvasScale, position: 'absolute', - border: '1px solid', }} > - +
+ +
); }; diff --git a/src/ide/components/NodeComponent/NodeTab.tsx b/src/ide/components/NodeComponent/NodeTab.tsx index 4d70d18..48ba933 100644 --- a/src/ide/components/NodeComponent/NodeTab.tsx +++ b/src/ide/components/NodeComponent/NodeTab.tsx @@ -1,4 +1,4 @@ -import { Button, Col, Form, Row } from 'react-bootstrap'; +import { Button, ButtonGroup, Col, Dropdown, DropdownButton, Row } from 'react-bootstrap'; import { CVFComponent } from '.'; import { CVFComponentOptions } from './CVFComponentOptions'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; @@ -6,39 +6,40 @@ import { useNodeStore } from '../../../core/contexts/NodeStore'; import { ZoomScale } from '../../types/ZoomScale'; const NodeTab = ({ component }: { component: CVFComponent }) => { - const { scale: zoom, options } = component.state; + const { options } = component.state; const notDisplay = options & CVFComponentOptions.NOT_DISPLAY; return (
{component.title} - - - component.changeScale(e.target.value === ZoomScale.PERC_AUTO ? ZoomScale.PERC_AUTO : parseFloat(e.target.value || '1'))} - > - - - - - - - - - - + + {/* }> */} + {/* Show source */} + {/* */} + }> + component.changeScale(ZoomScale.PERC_025)}>25% + component.changeScale(ZoomScale.PERC_033)}>33% + component.changeScale(ZoomScale.PERC_050)}>50% + component.changeScale(ZoomScale.PERC_075)}>75% + component.changeScale(ZoomScale.PERC_100)}>100% + component.changeScale(ZoomScale.PERC_150)}>150% + component.changeScale(ZoomScale.PERC_200)}>200% + component.changeScale(ZoomScale.PERC_AUTO)}>Auto scale + + + +