Skip to content

直线的无线滚动动画在高分辨率的屏幕上会使整个页面卡死 #2090

Open
@JGS12

Description

@JGS12

maptalks's version and what browser you use?

直线的无线滚动动画在高分辨率的屏幕上会使整个页面卡死

Issue description

let start = [item1.pointList[0].lngWgs, item1.pointList[0].latWgs];
let end = [item1.pointList[1].lngWgs, item1.pointList[1].latWgs];
const line = new maptalks.LineString([start, end], {
symbol: {
linePatternFile,
linePatternDx: 0,
lineWidth: 15,
// linePatternAnimSpeed: 0.25,
},
}).addTo(this.layer);
this.markerArrary[${index}${index1}] = line;
this.largePointJsonList[${index}${index1}] = line;
function animateLine() {
line.animate(
{
symbol: {
// 20 is the width of pattern.png to ensure seamless animation
linePatternDx: 30,
lineWidth: 15,
linePatternAnimSpeed: 0.25,
},
},
{
// 'duration': 3000, // 动画持续时间,单位毫秒
easing: "linear", // 缓动函数,这里使用线性动画
repeat: true, // 是否循环播放
}
);
}
line.on("animateend", function () {
// 动画结束后立即启动下一次动画
animateLine();
});
animateLine();

    });

在高分辨率的屏幕上直接卡死,整个地图页面都卡死,动不了,麻烦作者给看一下
Please provide a reproduction URL (on any jsfiddle like site)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions