-
Couldn't load subscription status.
- Fork 22
feat: Jim/GRWT-6600/implement fibonacci fan drawing tool in interactive layer #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jim-deriv
wants to merge
322
commits into
deriv-com:master
Choose a base branch
from
jim-deriv:jim/grwt-6600/implement-fibonacci-fan-drawing-tool-in-interactive-layer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
322 commits
Select commit
Hold shift + click to select a range
1293445
keep InteractiveLayer disabled for the moment
d3027ff
fix some import issues
741ed17
code cleanup :recycle:
1ca45a0
WIP: control repaiting
fd18911
providing YAxisModel
57c5b5d
Merge remote-tracking branch 'upstream/master' into ramin/restructure…
0ff90a5
use ListenableProvider instead
ab63b68
Check isInEpochRange for drawings
02e48d3
call setState after gesture callbacks
90540ef
some minor changes
90bba13
check the drawing state inside painter
fed0212
check interacting state inside the drawing
a41cb5c
minor change in shouldRepaint logic
7db9e4c
add animating state to drawing tools
d104707
pass selection animation controller in another place as well
d585944
remove a redundant parameter from Selected state
fba20be
fix lint warnings
98c4707
remove EquatableMixin from InteractableDrawing
024677f
code cleanup :recycle:
a389ea7
add a comment
9cf6e91
code cleanup :recycle:
001f267
fix: drawing positions not updated when drawing multiple at the same …
c2b287f
remove get state callback and get state directly
be4bc6a
chore: code cleanup :recycle:
8084e47
remove unused import
210649d
override isInEpochRange inside horizontal drawing tool
426cd7a
change isInEpochRange to isInViewPort to support Y-axis visibility check
6496913
WIP: don't animate when series is changed
0a3661f
return for horizontal line isInViewPort
4f55b42
do some fixes
61a0526
fix some lint warnings
22a2d6e
fix some lint warnings
b2df2ab
chore: code cleanup
d00516a
fix formatting
2ca691d
revert back the usage of InteractiveLayer to use the old implementati…
ade5fd4
add a comment
0c236a0
rename state normal to idle
b19205a
chore: code cleanup :recycle:
8f84884
use setEquals instead of a custom helper function
5152fee
code cleanup :recycle:
cfeb5cd
don't show drawing tools when input is empty and chart is in loading …
eff0266
Merge 'upstream/master' into ramin/restructure_drawing_tools_attempt_…
0e69c80
feat: add InteractiveLayerBahaviour
32f05cb
move first point when adding the line tool
c4ae7f5
line preview in mobile
fb099bf
default value for interactive layer behavour
e71f251
show alignment cross-hair when adding a tool in desktop
67d92c9
code cleanup :recycle:
e086356
code cleanup :recycle:
6caaf18
use polymorphism to get the prevew line according to the current beha…
b564d5c
code cleanup :recycle:
4273e11
remove doing tap in mobile adding state
1e541ec
WIP: making preview lines separate classes
1123502
reuse paint helper functions
7fc2aff
feat: add preview line drawing tool for desktop
a5565a3
code cleanup :recycle:
c73b15f
chore: move trend line files to a separate folder
22e3b14
chore: move horizontal line files to a separate folder
6c2cf93
feat: add desktop preivew line for horizontal line
bce64c9
chore: add some docs
1e27e26
use AddingToolAlignmentCrossHair inside TrendLine adding preview
53352ab
adding spawn point of the line preview on mobile inside the preview i…
8767bba
code cleanup :recycle:
538ae30
implement mobile preview for horizontal line'
fa82e3f
code cleanup :recycle:
387f161
add size property to interactive layer
a0b35c9
paint horizontal line preview as dashed
195d338
remove a redundant method
2b5fa10
code cleanup :recycle:
c4623cf
chore: code cleanup :recycle:
31f711c
chore: code cleanup :recycle:
7511a0d
chore: code cleanup :recycle:
a7b95e3
chore: add some docs
f6e6287
chore: improve documentations
c24124e
update documentation
7888e7e
update documentation
26adc21
add Mermaid and SVG files for diagrams in interactive layer docs
cfff28f
chore: update docs
011a9e7
show a different visuals when preview is being dragged
1ccd476
fix: fix the issue of line start point not getting dragged
0744610
chore: code cleanup :recycle:
14b1020
fix: fix the issue of horizontal line start point not getting dragged
304476a
chore: code cleanup :recycle:
316d47a
chore: fix formatting of a few files
b470bbf
chore: fix lint warnings
fff3741
change diagram files's extension to mmd
0eb6137
update diagram images using mermaid CLI
f4f0835
fix EOF of diagram file
300beed
chore: update README file
57f813a
chore: update README file
8c9bbd6
chore: code cleanup :recycle:
36ed044
chore: update README file
72af106
add interactiveLayerBehaviour param to DerivChart widget
d6e5ddb
chore: remove a method implemetation in DrawingV2 interface
ccae82d
chore: code cleanup :recycle:
3eaf524
chore: update docs
cb26f0d
chore: update docs
0057328
chore: code cleanup :recycle:
e4259d6
chore: update docs
99c74f1
chore: update docs
48712a5
chore: update docs
222c4d8
add key to interactive layer custom painter
9823f02
fix: fix drawing style change not affecting
84d7af7
update drawing tools architecture diagram
bcdb25d
update drawing tools architecture diagram
9937a31
Merge remote-tracking branch 'upstream/master' into ramin/restructure…
a8bca70
use the interactive behaviour provided from outside
fbf70e1
Merge 'upstream/master' into ramin/restructure_drawing_tools_attempt_…
a1190c8
check if behaviour is initialized
a6ddff7
chore: rename drawing tools state from idle to normal
29c56be
update docs
863750a
chore: update docs
a5e323e
update doc
513f02f
chore: rename methods in InteractiveLayerBase
18dd234
feat: animation effect when dragging trend line in mobile
55a7470
chore: add a comment
c21813b
feat: trend line second point start position from center
18a4c36
update a doc
790aa07
animate second point in trend line after first when it spawned
59c7ccf
refactor: don't check hitTest in adding tool state pan update
157f591
have a map for drawings passed to layer
e63db3a
minor change in onPanEnd adding state
660a581
add flag to switch between new and old impl of drawing tools
e494ae0
chore: update drawing tools doc
c7f597d
chore: update drawing tools doc
b3fef68
add barrel files
2c824bf
fix export file formatting
e1f074e
remove unused code
7af7115
update a doc
0ccd02e
use LayoutBuilder instead to determine the layer size'
3aab569
new behaviour when adding trend line in mobile
55f159b
chore: code cleanup :recycle:
b64565c
feat: show trend line preview on mobile as dashed line
fa26a1b
feat: add chartConfig to drawingv2 paint methods
e4f0fe3
feat: add paintOverYAxis method to DrawingV2 class
460fd8e
WIP: update the preview label based on design
6016baf
feat: add chartTheme to the paint method as well
b0d0256
fix the drawing preview label color
3c76d65
feat: show the label when horizontal tools is selected
6b8349c
feat: showing neon glowing effect when horizontal line is selected
636b9e4
feat: showing selected tool menu
19834f3
check start-end point distance for onTap in CustomGestureDetector
c44e0cf
chore: code cleanup :recycle:
fd2ea37
check if initialized drawing are initailzied
5045b8c
chore: remove debugging code
28a24c1
Merge 'upstream/master' into ramin/add_horizontal_line_tool_v2
2075701
move current state to controller
f640e27
move floating menu widget and controller to a separate file
1ebf0b8
chore: code cleanup:
cca3f13
prevent floating menu going out of screen
c81fc66
get tool bar widget from each drawing themselves
cc196de
fix: drawing tools change not being applied
c13dc81
chore: code cleanup:
b589342
Merge remote-tracking branch 'upstream/master' into ramin/add_horizon…
99657e7
delete drawing when floating menu delete button is tapped
f732a80
code cleanup :recycle:
777886d
refactor: move showing floating menu to selected state
8837fce
remove dependency to controller in floating menu widget
d6161c9
avoid reanimating if the drawing tools is already selected
d6b8f03
endup in selected state after a tool is added
f231abd
preview line on desktop based on design
c1d9a56
add labelStyle to config
00960e7
generate toJson/fromJson for labelStyle
c848fd2
pass labelStyle to draw label function
12b21be
fix: drawing not focused after just being added
68c69cf
go to selected state in layer itself
16d6fb6
go to selected state inside behaviour class after a tool just been added
a55e47b
change the default textStyle of the horizontal line
2763dfd
fix: fix a formatting issue
d77eb31
update selected tool floating menu based on design
119a381
chore: code cleanup:
1e1b912
chore: code cleanup:
a21bae3
fix lint warnings
6046605
revert some unnecessary changes
73b77b3
add some doc
5a373d6
fix lint warnings
887464b
apply design on floating tool bar menu
5cbb8f7
update toolbar based on design
c4ecd18
reset drawing preview after tools is added
ad9e54c
fix: fix issue of tool removing sometimes not working
a34b275
fix: fix issue floating menu not dismissing if delete from outside menu
c3cd6ac
add animation for open/closing flaoting menu
660d00a
fix: label text not animating
d141e72
chore: code cleanup:
44301ae
chore: add a comment
360a2f2
code cleanup :recycle:
942acd5
fix issue tool not following when you select and drag in one move
822a0b4
dispose contollers in interactive_layer.dart
d578f2b
minor change
8b95685
fix formatting
ca7a9b9
prevent re-selecting the tool which is already selected
d017e4f
make switching to different selected tools smooth
87a15d9
don't animate the other tool if we switch the selected tool
8fc71ff
update horizontal line painting based on design
51f9f01
code cleanup :recycle:
e9142cb
add neon effect to label as well
f82d755
fix delay when adding preview appears
0decbc2
don't animate even when switching selected tool on panStart
54b8d32
provide size as context to drawings
f856fe0
fix: hitTest for horizontal line not return true when touch position …
d746360
chore: remove debounce when saving drawing tools
be8f836
revert pubspec change
42cedc3
fix formatting
ed27cb4
minor change in UI dimensions
1fc1048
make the floating menu initial position customizable
adecc7e
fix lint warnings
b58881b
Merge branch 'ramin/add_horizontal_line_tool_v2' of github.com:ramin-…
jim-deriv 8c023b7
Merge branch 'master' of github.com:deriv-com/flutter-chart into jim/…
jim-deriv 46eaf1c
feat: add fibonacci fan drawing tool to the interactive layer
jim-deriv ec66e2c
refactor: use ratios from the FibonacciFanHelpers class
jim-deriv b55f42e
style: resolve code formatting issue
jim-deriv 43aad46
feat: add edge points for preview drawing on mobile
jim-deriv b91f50b
chore: adjust the y-position of the fibonacci fan drawing tool on mobile
jim-deriv 654b9ff
fix(fibfan): correct upside-down preview orientation on mobile
jim-deriv a49fe19
refactor(fibfan): extract common validation logic into utility methods
jim-deriv eb6a8bc
refactor(fibfan): Replace magic numbers with centralized constants
jim-deriv b68ec6d
docs(fibfan): Add comprehensive documentation and fix analyzer issues
jim-deriv ddbc324
perf(fibfan): Implement paint object caching for improved rendering p…
jim-deriv c5fb6a0
feat(showcase): Add expandable controls to all chart example screens
jim-deriv d925d0a
chore: remove unnecessary comment
jim-deriv 1118efc
feat: implement angle-based Fibonacci fan calculations
jim-deriv 1963b9f
fix(fibfan): only the edgePoint being dragged should glow
jim-deriv 7afb70a
docs(fibfan): add documentation for edge point visual feedback logic
jim-deriv 6073dc2
feat(fibfan): enhance control point visibility and remove mobile glow…
jim-deriv 1fca11c
fix(fibfan): reverse fan angle mapping and fix hit testing consistency
jim-deriv 12ecc09
perf(fibfan): optimize text painter cache to eliminate performance bo…
jim-deriv ede97a5
refactor(fibfan): replace nullable bool with enum for drag state
jim-deriv 1c78e8f
fix(fibfan): align mobile preview angle calculations with main fan
jim-deriv 8eed82c
Merge branch 'master' of github.com:deriv-com/flutter-chart into jim/…
jim-deriv 0899b16
fix: resolve Fibonacci Fan compilation errors and implement completio…
jim-deriv 97f7e57
feat: update Fibonacci Fan toolbar to match horizontal line implement…
jim-deriv 057f7c1
feat: update generated files and configurations for fibonacci fan dra…
jim-deriv 31c6bc2
feat: add 4 color selection slots for fibfan drawing tool
jim-deriv 8edd545
fix: make fibfan fill color match level0 color from fibonacciLevelColors
jim-deriv 02bd1a1
Fix Fibonacci fan angle calculation and update drawing tool config
jim-deriv c892b9d
Merge branch 'master' of github.com:deriv-com/flutter-chart into jim/…
jim-deriv 72a647d
feat: implement z-index functionality for edge point labels during dr…
jim-deriv 06512b4
feat: apply z-index functionality to trend line drawing tool
jim-deriv 45030a6
style: fix formatting in trend line drawing tool
jim-deriv 09d6b65
feat: implement automated cache management for Fibonacci Fan drawing …
jim-deriv 5ceb836
Fix generic type constraint in drawLabelsWithZIndex function
jim-deriv 5b90b99
fix: enhance TextPainter cache key to include font family and weight
jim-deriv 970d7b6
feat: make fibfan edge points use same color as top/bottom lines
jim-deriv cf8ceaa
feat: update fibfan alignment guides to use same color as edge points
jim-deriv 29d1120
feat: update fibfan value and epoch labels to use same color as edge …
jim-deriv 5c604b3
Fix label text colors to match border colors in drawEpochLabel and dr…
jim-deriv 0538d4e
feat: implement crosshair visibility logic for drawing tool selection
jim-deriv 71bb881
feat: make entire fibfan area draggable using fan fill logic
jim-deriv f8ed6aa
refactor: consolidate fibfan hit testing and drawing logic
jim-deriv 00efac0
Merge branch 'master' of github.com:deriv-com/flutter-chart into jim/…
jim-deriv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 26 additions & 3 deletions
29
lib/src/add_ons/drawing_tools_ui/fibfan/fibfan_drawing_tool_config.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
lib/src/deriv_chart/interactive_layer/interactable_drawings/fibfan/drag_state.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /// Enum representing the different drag states for Fibonacci Fan drawing tool. | ||
| /// | ||
| /// This enum provides clear, explicit states for drag interactions, improving | ||
| /// code readability and reducing the risk of misinterpreting the drag state | ||
| /// compared to using a nullable boolean. | ||
| enum FibfanDragState { | ||
| /// User is dragging the start point of the fan. | ||
| /// | ||
| /// In this state, only the start point moves while the end point remains fixed. | ||
| /// This allows users to adjust the origin of the Fibonacci fan lines. | ||
| draggingStartPoint, | ||
|
|
||
| /// User is dragging the end point of the fan. | ||
| /// | ||
| /// In this state, only the end point moves while the start point remains fixed. | ||
| /// This allows users to adjust the direction and scale of the Fibonacci fan lines. | ||
| draggingEndPoint, | ||
|
|
||
| /// User is dragging the entire fan. | ||
| /// | ||
| /// In this state, both start and end points move together, maintaining their | ||
| /// relative positions. This allows users to reposition the entire fan without | ||
| /// changing its shape or orientation. | ||
| draggingEntireFan, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.