1
0
Fork 0
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:
Acamaeda 2020-10-16 17:04:11 -04:00
parent 5e5220acc1
commit 708c7beeb5
3 changed files with 10 additions and 16 deletions

View file

@ -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%)'
}
}