fixed some impercision in copy to clipboard

This commit is contained in:
jill 2021-09-19 19:44:55 +03:00
parent e3ddf63823
commit 8fc339ec63
2 changed files with 9 additions and 6 deletions

View file

@ -50,10 +50,11 @@ function self.createButtons()
local e = ease.eases[dropdown.kselected('ease1')]
param1[1] = (slider.kvalue(e.name .. 'param11') ~= (e1.params[1] and e1.params[1].default) and slider.kvalue(e.name .. 'param11'))
param1[2] = (slider.kvalue(e.name .. 'param12') ~= e.params[2].default and slider.kvalue(e.name .. 'param12'))
param1[2] = (slider.kvalue(e.name .. 'param12') ~= (e1.params[1] and e1.params[1].default) and slider.kvalue(e.name .. 'param12'))
local p1 = ''
for i,v in ipairs(nillify(param1)) do
v = math.floor(v * 100) / 100
p1 = p1 .. (i > 1 and (', ' .. v) or v)
end
@ -69,14 +70,16 @@ function self.createButtons()
local p1 = ''
for i,v in ipairs(nillify(param1)) do
v = math.floor(v * 100) / 100
p1 = p1 .. (i > 1 and (', ' .. v) or v)
end
local p2 = ''
for i,v in ipairs(nillify(param2)) do
v = math.floor(v * 100) / 100
p2 = p2 .. (i > 1 and (', ' .. v) or v)
end
s = 'mixEase(' .. e1.name .. (p1 ~= '' and ('.params(' .. p1 .. ')') or '') .. ', ' .. e2.name .. (p2 ~= '' and ('.params(' .. p2 .. ')') or '') .. ', ' .. slider.kvalue('mix') .. ')'
s = 'mixEase(' .. e1.name .. (p1 ~= '' and ('.params(' .. p1 .. ')') or '') .. ', ' .. e2.name .. (p2 ~= '' and ('.params(' .. p2 .. ')') or '') .. ', ' .. (math.floor(slider.kvalue('mix') * 100) / 100) .. ')'
elseif mode == modes.multiply then
local e1 = ease.eases[dropdown.kselected('ease1')]
local e2 = ease.eases[dropdown.kselected('ease2')]
@ -88,10 +91,12 @@ function self.createButtons()
local p1 = ''
for i,v in ipairs(nillify(param1)) do
v = math.floor(v * 100) / 100
p1 = p1 .. (i > 1 and (', ' .. v) or v)
end
local p2 = ''
for i,v in ipairs(nillify(param2)) do
v = math.floor(v * 100) / 100
p2 = p2 .. (i > 1 and (', ' .. v) or v)
end

View file

@ -83,8 +83,7 @@ function self.createSliders()
max = v.max,
default = v.default,
name = ease1.name .. 'param1' .. i,
displayname = 'Parameter ' .. v.name,
snap = 0.001
displayname = 'Parameter ' .. v.name
})
end
end
@ -98,8 +97,7 @@ function self.createSliders()
max = v.max,
default = v.default,
name = ease2.name .. 'param2' .. i,
displayname = 'Parameter ' .. v.name,
snap = 0.001
displayname = 'Parameter ' .. v.name
})
end
end