You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const randomStr = (length, chars) => {
length = length || 6
chars = chars || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var result = ''
for (var i = length; i > 0; --i) {
result += chars[Math.floor(Math.random() * chars.length)]
}
return result
}
const generateRawData = () => {
let columns = generateColumnsData()
let res = []
for (let r = 0; r < 1000; r++) {
let obj = {}
for (let i = 0; i < columns.length; i++) {
obj[columns[i]] = randomStr(8)
}
res.push(obj)
}
return res
}
const generateColumnsData = () => {
let columns = []
for (let i = 1; i <= 200; i++) {
columns.push(column-${i})
}
return columns
}
🏷 Version
Sheet Type
🖋 Description
表格滚动条拖动,会出现卡顿掉帧;但是在缩放浏览器恢复之后又很丝滑
🔗 Reproduce Link
样例代码:
`
import { TableSheet } from "@antv/s2";
const randomStr = (length, chars) => {
length = length || 6
chars = chars || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var result = ''
for (var i = length; i > 0; --i) {
result += chars[Math.floor(Math.random() * chars.length)]
}
return result
}
const generateRawData = () => {
let columns = generateColumnsData()
let res = []
for (let r = 0; r < 1000; r++) {
let obj = {}
for (let i = 0; i < columns.length; i++) {
obj[columns[i]] = randomStr(8)
}
res.push(obj)
}
return res
}
const generateColumnsData = () => {
let columns = []
for (let i = 1; i <= 200; i++) {
columns.push(
column-${i}
)}
return columns
}
const s2Options = {
width: 1700,
height: 600,
showSeriesNumber: true,
}
const s2DataConfig = {
fields: {
columns: generateColumnsData() ,
},
data: generateRawData(),
}
const rootElement = document.getElementById("root");
const s2 = new TableSheet(rootElement, s2DataConfig, s2Options);
s2.render();
`
😊 Expected Behavior
滚动条拖拽不开洞,或者开放出懒加载渲染是否开启的 API
😅 Current Behavior
滚动条拖拽卡顿
浏览器缩放一下后,拖拽很丝滑
The text was updated successfully, but these errors were encountered: