mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-05 07:41:04 +00:00
This didn't seem to be working out but I'd rather hang onto it
This commit is contained in:
parent
5e5220acc1
commit
708c7beeb5
3 changed files with 10 additions and 16 deletions
js
12
js/temp.js
12
js/temp.js
|
@ -114,17 +114,7 @@ function constructBarStyles(layer){
|
|||
bar.fillDims = {'width': bar.width + "px", 'height': bar.height + "px"}
|
||||
if (dir !== undefined)
|
||||
{
|
||||
bar.fillDims[DIR_MARGINS[dir]] = "0px"
|
||||
if (dir == UP || dir == DOWN)
|
||||
{
|
||||
bar.fillDims.height = bar.height * bar.progress + "px"
|
||||
if (dir == UP) bar.fillDims['margin-top'] = bar.height * (1 - Math.min(bar.progress, 1)) + "px"
|
||||
}
|
||||
else
|
||||
{
|
||||
bar.fillDims.width = bar.width * bar.progress + "px"
|
||||
if (dir == LEFT) bar.fillDims['margin-left'] = bar.width * (1 - Math.min(bar.progress, 1)) + "px"
|
||||
}
|
||||
bar.fillDims['clip-path'] = 'inset(0% 0% 50% 0%)'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue