Commit graph

222 commits

Author SHA1 Message Date
Eric NGUYEN
4588aa9443 Rename DefaultX, DefaultY to X and Y + add docs 2022-08-31 15:34:25 +02:00
Eric NGUYEN
4cd8f76d7c Hide console.warn 2022-08-31 11:35:49 +02:00
Eric NGUYEN
35e9421ae8 Hide behaviors handled error messages 2022-08-31 11:33:45 +02:00
Eric NGUYEN
3feae9367b Fix symbol behavior not imposing its position when anchor is enabled 2022-08-31 11:32:19 +02:00
Eric NGUYEN
5fdbd771ff Add try catch to behaviors 2022-08-31 10:57:55 +02:00
Eric NGUYEN
5fdee602f1 Fix ApplyBehaviorsOnSiblings type and performance 2022-08-31 10:55:34 +02:00
Eric NGUYEN
191fa9cfa2 Fix flex not applying when moving symbols 2022-08-31 10:46:32 +02:00
Eric NGUYEN
08f98bd40f Fix Floating button not shifting when symbols is open 2022-08-31 10:44:40 +02:00
Eric NGUYEN
b6571e32d2 Update tests with new properties 2022-08-30 18:05:19 +02:00
Eric NGUYEN
5aaf1f4745 Set dimension to fixed 2 2022-08-30 17:45:00 +02:00
Eric NGUYEN
5fa9db931f Implement borrower dimension 2022-08-30 17:36:48 +02:00
Eric Nguyen
57e6c9a156 Merged PR 173: Implements API methods through right click + more (read desc)
- Implements API methods through right click
- Refactor events
- Refactor usage of setHistory and setHistoryCurrentStep into a single function
- Update ContainerOperations documentations
- Added AddContainers in order to add multiple containers + refactor AddContainer to use it
- Fix regression
- Fix AddContainer at index
2022-08-30 14:45:29 +00:00
79c6874240 Fix regression 2022-08-29 17:06:23 +02:00
Eric Nguyen
87c4ea1fe5 Merged PR 171: Refactor the multiple context menus into a single component + Fix eslint
Refactor the multiple context menus into a single component + Fix eslint
2022-08-29 15:03:47 +00:00
Eric Nguyen
ad126c6c28 Merged PR 170: Add new eslint rules
- naming-convention
- prefer-arrow-callback
- func-style
- import/no-default-export
2022-08-26 16:13:21 +00:00
Eric Nguyen
3f58c5ba5e Merged PR 169: Fix bugs with flex + Disable obnoxious swals + Add selector text + Sort SVG scss to different files
- Disable PushBehavior and set it in a different file
- Fix behviors when parent === undefined
- Fix flex behavrios when using anchors
- Fix siblings not applying flex to theirs children on container delete
- Fix flex behavior when using anchors
- Enable flex by default
- Disable obnoxious swals
- Add selector text
- Sort SVG scss to different files

Others: Add some todos
2022-08-26 13:59:03 +00:00
Eric Nguyen
444b96736a Merged PR 168: Add SmartComponent source code + Restrict Events by giving a root at the first render + Added Render function to a namespace
- Add smartcomponent source code to public/
- Restrict Events by giving a root at the first render + Added Render function to a namespace
- Add attribute type="button" to all buttons
2022-08-26 09:13:51 +00:00
Eric Nguyen
7f3f6a489a Merged PR 167: Add Flex and fix bugs (read desc)
Note: The branch name does not fit the new features.

- Implement Flex with simplex
- Enable rigid body by default (removed IsRigidBody property) <=== possibly a bad idea
- Sort children in add and update properties
- Implement MaxWidth
- Add more docs

Fixes :
- .env.production url
- Symbols: not blocking the linked container when the parent is moving
2022-08-25 13:28:32 +00:00
Eric Nguyen
ec3fddec9d Merged PR 165: Move useEffects to named functions
Move useEffects to named functions
2022-08-22 15:52:40 +00:00
Eric Nguyen
29625dce28 Merged PR 164: Clear the leftover TODOs
All checks were successful
continuous-integration/drone/push Build is passing
- Remove nullable type from container.properties.parentId
- Add Swal when trying to delete main container
- Moved default editor state to default.ts
- Moved default symbol model to default.ts
2022-08-22 15:03:46 +00:00
Eric Nguyen
66ea3b1b64 Merged PR 163: Remove the static form + rename some components for clarity
All checks were successful
continuous-integration/drone/push Build is passing
The static form is hard to maintain so I am removing it + rename some components for clarity + moved some utils files
2022-08-22 14:37:25 +00:00
Eric Nguyen
8b8d88f885 Merged PR 162: Implement symbols and other stuff (see desc)
Implement symbols
- Add, Remove, Select Container
- Form
- Link with container
- Symbol behavior application to container (move to x with xpositionreference)

Important changes
- Remove SelectedContainer from HistoryState, meaning that it will be slower for each load but will be faster for each operations* (SetHistory, SelectContainer, DeleteContainer, SymbolOperations)
- ElementsSidebar now opens with isSidebarOpen meaning that both sidebar will open on toggle
- Moved camelize, transformX, restoreX to different modules (stringtools.ts, svg.ts)
2022-08-22 13:58:32 +00:00
58ef28fe89 Remove selector from svg export + fix svg format
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-18 17:10:46 +02:00
fa2d8e3e6e Fix RigidBody overlap on the right + Add tests 2022-08-18 16:19:55 +02:00
9f9ec8dc65 Implement DefaultChildType
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-08-18 15:51:45 +02:00
f268011315 Implement more options + Add depth dimension (revert DimensionLayer) (#37)
All checks were successful
continuous-integration/drone/push Build is passing
- Displayed text
- Enable Shortcuts
- Hide text
- Disable Dimension
- Depth dimension

Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/37
2022-08-18 08:46:50 -04:00
70863261aa Merge pull request 'Add swals + Remove incompatible saves + add new tests' (#36) from dev.swal into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/36
2022-08-18 06:14:56 -04:00
4971ec7e5d Add swals + Remove incompatible saves + add new tests
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-08-18 12:13:51 +02:00
0e161ffce0 Refactor behaviors into a single function (#35)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/35
2022-08-18 06:11:40 -04:00
Eric NGUYEN
c7bc77b08f Fix build version of the project because of web workers 2022-08-17 17:47:16 +02:00
2945febd91 Implement minWidth property + refactor default property of new containers and main container (#34)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Eric NGUYEN <enguyen@techform.fr>
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/34
2022-08-17 11:14:19 -04:00
Eric Nguyen
e96e4f123b Merged PR 18: Add support for custom SVG
Some checks failed
continuous-integration/drone/push Build is failing
Add support for custom SVG
Add userData back into IProperties
Added library interweave
Update example
2022-08-17 13:43:24 +00:00
Eric NGUYEN
82eae4971e Refactor RigidBodyBehaviors
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-17 15:39:37 +02:00
Eric NGUYEN
286a5e9c00 Fix rigid body in which children thinks there was enough space
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-17 15:12:38 +02:00
Eric NGUYEN
d29d1f5054 Better description of add + fix regression form validation + fix http server not using strokeWidth + add doc about hardcoded
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-16 17:45:52 +02:00
Eric NGUYEN
a36d5d79d4 Fix test: when using dynamic input, the value is converted correctly as number before being send to the change event
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-08-16 16:54:12 +02:00
Eric NGUYEN
e3190dfe0a Refactor PropertiesOperations for more readability
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2022-08-16 16:48:43 +02:00
Eric NGUYEN
0fcc2244bb History: Fix regression with delete
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-16 16:34:44 +02:00
Eric NGUYEN
1622816035 Final fix for XPositionReference : We are now lying to the user in the form. The transformation is applied to the value that is shown but the transformation is restored for the computing afterward 2022-08-16 16:34:32 +02:00
5f8e011bc6 Unrefactor Properties form to allow more freedom on the input types and form (#32)
All checks were successful
continuous-integration/drone/push Build is passing
- The css style is now in IProperties.Style again.
- Forms are divided in DynamicForm and StaticForm
- Faster because less logic
- Add RadioGroupButton
- Add InputGroup
- Fix Children Dimensions not using x for their origin

Co-authored-by: Eric NGUYEN <enguyen@techform.fr>
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/32
2022-08-16 08:57:54 -04:00
Eric NGUYEN
3d7baafc17 Clean elementsSidebar and fix eslint
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-16 09:57:59 +02:00
dcfb93aa12 Fix bugs created by using Number()
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-08-15 23:04:45 +02:00
3c164581ce Remove Number() calls
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-15 22:57:08 +02:00
4fbc67835c XPositionReference: Fix Selector and Append
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-15 22:26:59 +02:00
522cd722c0 Added AddMethod and Default x,y,width,height on Add
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-15 22:07:08 +02:00
b8bd179167 Added Dimension of all children under the container (#30)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/30
2022-08-15 15:12:35 -04:00
7ff411b988 Implement webworker for save operation + Limit the history size (#29)
All checks were successful
continuous-integration/drone/push Build is passing
- Implement webworker for save operation
- Limit the history size

Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/29
2022-08-15 11:52:17 -04:00
5b20e4f2dc Revert "Replace sqrt in Dimension by Fast inverse square root"
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit 497d2173e8.
2022-08-15 16:00:04 +02:00
497d2173e8 Replace sqrt in Dimension by Fast inverse square root
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-15 15:41:38 +02:00
d6eb9ea364 Optimize history and fix nodes pollution + fix css + removes motion.framer (#28)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/28
2022-08-12 16:31:37 -04:00