We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这个功能有个问题,如果filter和map指定刚好重复的话会返回异常的值 例子
<div class="lift-transition-sticky-content" tg-from="0" tg-to="100" tg-edge="cover" tg-name="position" tg-filter="0,50,100@" tg-map="0:50;50:0;100:0" ></div>
在50-100的值为0,但是最终渲染的会是50,因为map也指定了0的映射值 源码问题在这
50-100
0
50
export function parseValues() { if (filter.values.length > 0 && !filter.values.includes(value)) { if (filter.mode === 'smooth') { let region = calcKeyFrameRegion(mapping, value); if (region.length) { // 这里获取的范围值是 0 value = calcKeyFrameValue(mapping, value, region); } else { return; } } else { if (filter.mode === 'exact') { element.lastValue = null; el.style.removeProperty(name); } return; } } // 这里会根据value的值重新获取映射导致异常 if (typeof mapping[value] !== 'undefined') { value = mapping[value]; } }
Originally posted by @RexYao97 in #28 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这个功能有个问题,如果filter和map指定刚好重复的话会返回异常的值
例子
在
50-100
的值为0
,但是最终渲染的会是50
,因为map也指定了0
的映射值源码问题在这
Originally posted by @RexYao97 in #28 (comment)
The text was updated successfully, but these errors were encountered: