Skip to content
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

Add Class Parameters, Parent Containment, and Updated Touch Controls #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

BSchafer01
Copy link
Contributor

Class Parameters

  • Added LeftClassString, RightClassString, TopClassString, BottomClassString, SliderClassString, and OverrideSliderStyle parameters to the vertical panel and horizontal panel components.
    • Moved the slider's background-color and cursor styles to a defaultSlider class in the isolated CSS of the horizontal and vertical panel components
    • To change the background and cursor parameters of the slider, the user needs to set OverrideSliderStyle to true and then the user can define the background and cursor to what they would like
  • Added ClassString parameter to the absolute panel component

Parent Containment

  • Stemming from issue I do not want the Slider to be Absolute, but to inherit it's position from the div that owns it #2 I've updated the logic within the resize commands
    • Added a ParentContained parameter to the absolute panel. The user must set this to true if they want the panel controls to be contained to it's parent div.
    • If this is set the javascript will look for the base absolute panel div which now has a new class AbsolutePanel, once it finds this it will get the calculated values of its parent element
    • Instead of passing the window's inner width and inner height it will pass in the parent's calculated width and height

Updated Touch Controls

  • While working through the logic for containing the panel controls, I noticed an uncaught exception error in the console for touch events on the slider.
    • The touch even was passing a float value instead of an int like the mouse events and was resulting in a json parsing error
    • I wrapped the touch events in a parseInt() function to get the int value to pass along and alleviate the uncaught exception

Added Sample Views and Test Cases

  • Added a sample view for custom classes and a sample view for parent contained panels in the Blazor Server and Blazor WASM projects
  • Added a test for each new view in the WASM project and updated the tests to match the new output

Let me know if there's anything you would like to see differently.

Added class parameters for the slider panels and Absolute panel
Updated the logic of the Absolute Panel to be contained within a parent container/div
While updating the logic, I fixed the touch controls to output int pixels to remove an uncaught error
Added a functionality to define the starting width/height of a panel based on the parent container's width/height.
Wrapped some cascading values to handle vertical/horizontal panel widths and heights.
Modified the integration tests to capture the new menu item and the "approximate golden ratio sample" page
@BSchafer01
Copy link
Contributor Author

I just added functionality to allow users to define their width/height units (either percent, px, or rem). If the user specifies percent they will define the initial percentage in the "TopPanelHeight" or "LeftPanelStartingWidth" parameters.

@LBost
Copy link

LBost commented Feb 9, 2022

Any chance this gets pulled into the master?

@carlfranklin
Copy link
Owner

carlfranklin commented May 12, 2022 via email

@Yomodo
Copy link

Yomodo commented Oct 19, 2023

@carlfranklin This PR seems really valuable on top of your great work. Please merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants