diff --git a/packages/core/src/shaders/projection.glsl b/packages/core/src/shaders/projection.glsl index 59168c172e..05bd91cc54 100644 --- a/packages/core/src/shaders/projection.glsl +++ b/packages/core/src/shaders/projection.glsl @@ -104,16 +104,16 @@ vec2 project_pixel_size_to_clipspace(vec2 pixels) { } float project_pixel(float pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { + if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 - return pixel * pow(2.0, (20.0 - u_Zoom)); + return pixel * pow(2.0, (19.0 - u_Zoom)); } return pixel; } vec2 project_pixel(vec2 pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { + if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 - return pixel * pow(2.0, (20.0 - u_Zoom)); + return pixel * pow(2.0, (19.0 - u_Zoom)); } return pixel; } diff --git a/packages/layers/src/point/shaders/extrude_vert.glsl b/packages/layers/src/point/shaders/extrude_vert.glsl index 3586c80cda..603215a834 100644 --- a/packages/layers/src/point/shaders/extrude_vert.glsl +++ b/packages/layers/src/point/shaders/extrude_vert.glsl @@ -22,7 +22,7 @@ void main() { vec2 offset = project_pixel(size.xy); - vec4 project_pos = project_position(vec4(a_Pos.xy, 0, 1.0)); + vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0)); vec4 pos = vec4(project_pos.xy + offset, project_pixel(size.z), 1.0); float lightWeight = calc_lighting(pos); diff --git a/packages/scene/__tests__/index.spec.ts b/packages/scene/__tests__/index.spec.ts index e69de29bb2..10d6ee85d5 100644 --- a/packages/scene/__tests__/index.spec.ts +++ b/packages/scene/__tests__/index.spec.ts @@ -0,0 +1,11 @@ +// @ts-ignore +describe('template', () => { + const el = document.createElement('div'); + el.id = 'test-div-id'; + el.innerHTML = 'hello L7'; + document.querySelector('body').appendChild(el); + + it('div content', () => { + expect(document.querySelector('#test-div-id')?.innerHTML).toBe('hello L7'); + }); +}); diff --git a/stories/Layers/components/column.tsx b/stories/Layers/components/column.tsx index 77060db564..07823fca6c 100644 --- a/stories/Layers/components/column.tsx +++ b/stories/Layers/components/column.tsx @@ -43,7 +43,7 @@ export default class Column extends React.Component { 'squareColumn', ]) .size('unit_price', (h) => { - return [6, 6, h / 500]; + return [6, 6, 100]; }) .color('name', ['#739DFF', '#61FCBF', '#FFDE74', '#FF896F']) .style({