-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
16 changed files
with
213 additions
and
91 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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
52 changes: 27 additions & 25 deletions
52
src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Splitter/BitSplitter.ts
This file contains 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 |
---|---|---|
@@ -1,30 +1,32 @@ | ||
class BitSplitter { | ||
public static handleSplitterDragging(event: TouchEvent) { | ||
document.body.style.overscrollBehavior = 'none'; | ||
}; | ||
namespace BitBlazorUI { | ||
export class Splitter { | ||
public static handleSplitterDragging(event: TouchEvent) { | ||
document.body.style.overscrollBehavior = 'none'; | ||
}; | ||
|
||
public static handleSplitterDraggingEnd() { | ||
document.body.style.overscrollBehavior = ''; | ||
}; | ||
public static handleSplitterDraggingEnd() { | ||
document.body.style.overscrollBehavior = ''; | ||
}; | ||
|
||
public static getSplitterWidth(element: HTMLElement) { | ||
return element.getBoundingClientRect().width; | ||
}; | ||
public static getSplitterWidth(element: HTMLElement) { | ||
return element.getBoundingClientRect().width; | ||
}; | ||
|
||
public static setSplitterWidth(element: HTMLElement, width: number) { | ||
element.style.width = width + 'px'; | ||
}; | ||
public static setSplitterWidth(element: HTMLElement, width: number) { | ||
element.style.width = width + 'px'; | ||
}; | ||
|
||
public static getSplitterHeight(element: HTMLElement) { | ||
return element.getBoundingClientRect().height; | ||
}; | ||
public static getSplitterHeight(element: HTMLElement) { | ||
return element.getBoundingClientRect().height; | ||
}; | ||
|
||
public static setSplitterHeight(element: HTMLElement, height: number) { | ||
element.style.height = height + 'px'; | ||
}; | ||
|
||
public static resetPaneDimensions(element: HTMLElement) { | ||
element.style.width = ''; | ||
element.style.height = ''; | ||
}; | ||
} | ||
public static setSplitterHeight(element: HTMLElement, height: number) { | ||
element.style.height = height + 'px'; | ||
}; | ||
|
||
public static resetPaneDimensions(element: HTMLElement) { | ||
element.style.width = ''; | ||
element.style.height = ''; | ||
}; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Splitter/BitSplitterJsRuntimeExtensions.cs
This file contains 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,39 @@ | ||
namespace Bit.BlazorUI; | ||
|
||
internal static class BitSplitterJsRuntimeExtensions | ||
{ | ||
internal static ValueTask BitSplitterResetPaneDimensions(this IJSRuntime js, ElementReference element) | ||
{ | ||
return js.InvokeVoid("BitBlazorUI.Splitter.resetPaneDimensions", element); | ||
} | ||
|
||
internal static ValueTask<double> BitSplitterGetSplitterWidth(this IJSRuntime js, ElementReference element) | ||
{ | ||
return js.Invoke<double>("BitBlazorUI.Splitter.getSplitterWidth", element); | ||
} | ||
|
||
internal static ValueTask BitSplitterSetSplitterWidth(this IJSRuntime js, ElementReference element, double value) | ||
{ | ||
return js.InvokeVoid("BitBlazorUI.Splitter.setSplitterWidth", element, value); | ||
} | ||
|
||
internal static ValueTask<double> BitSplitterGetSplitterHeight(this IJSRuntime js, ElementReference element) | ||
{ | ||
return js.Invoke<double>("BitBlazorUI.Splitter.getSplitterHeight", element); | ||
} | ||
|
||
internal static ValueTask BitSplitterSetSplitterHeight(this IJSRuntime js, ElementReference element, double value) | ||
{ | ||
return js.InvokeVoid("BitBlazorUI.Splitter.setSplitterHeight", element, value); | ||
} | ||
|
||
internal static ValueTask BitSplitterHandleSplitterDragging(this IJSRuntime js, TouchEventArgs e) | ||
{ | ||
return js.InvokeVoid("BitBlazorUI.Splitter.handleSplitterDragging", e); | ||
} | ||
|
||
internal static ValueTask BitSplitterHandleSplitterDraggingEnd(this IJSRuntime js) | ||
{ | ||
return js.InvokeVoid("BitBlazorUI.Splitter.handleSplitterDraggingEnd"); | ||
} | ||
} |
This file contains 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 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
Oops, something went wrong.