Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
9211febb
Commit
9211febb
authored
Feb 23, 2024
by
Andray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ResizeHandleRow - allow overriden column scale parametr
parent
18819723
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
javascript/resizeHandle.js
javascript/resizeHandle.js
+5
-4
No files found.
javascript/resizeHandle.js
View file @
9211febb
(
function
()
{
(
function
()
{
const
GRADIO_MIN_WIDTH
=
320
;
const
GRADIO_MIN_WIDTH
=
320
;
const
GRID_TEMPLATE_COLUMNS
=
'
1fr 16px 1fr
'
;
const
PAD
=
16
;
const
PAD
=
16
;
const
DEBOUNCE_TIME
=
100
;
const
DEBOUNCE_TIME
=
100
;
...
@@ -37,7 +36,7 @@
...
@@ -37,7 +36,7 @@
}
}
function
afterResize
(
parent
)
{
function
afterResize
(
parent
)
{
if
(
displayResizeHandle
(
parent
)
&&
parent
.
style
.
gridTemplateColumns
!=
GRID_TEMPLATE_COLUMNS
)
{
if
(
displayResizeHandle
(
parent
)
&&
parent
.
style
.
gridTemplateColumns
!=
parent
.
style
.
originalGridTemplateColumns
)
{
const
oldParentWidth
=
R
.
parentWidth
;
const
oldParentWidth
=
R
.
parentWidth
;
const
newParentWidth
=
parent
.
offsetWidth
;
const
newParentWidth
=
parent
.
offsetWidth
;
const
widthL
=
parseInt
(
parent
.
style
.
gridTemplateColumns
.
split
(
'
'
)[
0
]);
const
widthL
=
parseInt
(
parent
.
style
.
gridTemplateColumns
.
split
(
'
'
)[
0
]);
...
@@ -59,7 +58,9 @@
...
@@ -59,7 +58,9 @@
parent
.
style
.
display
=
'
grid
'
;
parent
.
style
.
display
=
'
grid
'
;
parent
.
style
.
gap
=
'
0
'
;
parent
.
style
.
gap
=
'
0
'
;
parent
.
style
.
gridTemplateColumns
=
GRID_TEMPLATE_COLUMNS
;
const
gridTemplateColumns
=
`
${
parent
.
children
[
0
].
style
.
flexGrow
}
fr
${
PAD
}
px
${
parent
.
children
[
1
].
style
.
flexGrow
}
fr`
;
parent
.
style
.
gridTemplateColumns
=
gridTemplateColumns
;
parent
.
style
.
originalGridTemplateColumns
=
gridTemplateColumns
;
const
resizeHandle
=
document
.
createElement
(
'
div
'
);
const
resizeHandle
=
document
.
createElement
(
'
div
'
);
resizeHandle
.
classList
.
add
(
'
resize-handle
'
);
resizeHandle
.
classList
.
add
(
'
resize-handle
'
);
...
@@ -96,7 +97,7 @@
...
@@ -96,7 +97,7 @@
evt
.
preventDefault
();
evt
.
preventDefault
();
evt
.
stopPropagation
();
evt
.
stopPropagation
();
parent
.
style
.
gridTemplateColumns
=
GRID_TEMPLATE_COLUMNS
;
parent
.
style
.
gridTemplateColumns
=
parent
.
style
.
originalGridTemplateColumns
;
});
});
afterResize
(
parent
);
afterResize
(
parent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment