Skip to content
New issue

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

fix: fix slider handle error and click tail error when scaled #2223

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useWorkspaces": true,
"npmClient": "yarn",
"version": "2.57.0"
"version": "2.57.1-alpha.0"
}
6 changes: 3 additions & 3 deletions packages/semi-animation-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation-react",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "motion library for semi-ui-react",
"keywords": [
"motion",
Expand All @@ -25,8 +25,8 @@
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.57.0",
"@douyinfe/semi-animation-styled": "2.57.0",
"@douyinfe/semi-animation": "2.57.1-alpha.0",
"@douyinfe/semi-animation-styled": "2.57.1-alpha.0",
"classnames": "^2.2.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-animation-styled/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation-styled",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "semi styled animation",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-animation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "animation base library for semi-ui",
"keywords": [
"animation",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-semi-design",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "semi ui eslint plugin",
"keywords": [
"semi",
Expand Down
4 changes: 2 additions & 2 deletions packages/semi-foundation/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@douyinfe/semi-foundation",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "",
"scripts": {
"build:lib": "node ./scripts/compileLib.js",
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.57.0",
"@douyinfe/semi-animation": "2.57.1-alpha.0",
"async-validator": "^3.5.0",
"classnames": "^2.2.6",
"date-fns": "^2.29.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-icons-lab/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-icons-lab",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "semi icons lab",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-icons",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "semi icons",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-illustrations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-illustrations",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "semi illustrations",
"keywords": [
"semi",
Expand Down
4 changes: 2 additions & 2 deletions packages/semi-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-next",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "Plugin that support Semi Design in Next.js",
"author": "伍浩威 <wuhaowei.whw@bytedance.com>",
"homepage": "",
Expand All @@ -23,7 +23,7 @@
"typescript": "^4"
},
"dependencies": {
"@douyinfe/semi-webpack-plugin": "2.57.0"
"@douyinfe/semi-webpack-plugin": "2.57.1-alpha.0"
},
"gitHead": "eb34a4f25f002bb4cbcfa51f3df93bed868c831a"
}
2 changes: 1 addition & 1 deletion packages/semi-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-rspack-plugin",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "",
"homepage": "",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-scss-compile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-scss-compile",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "compile semi scss to css",
"author": "daiqiang@bytedance.com",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-theme-default/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-theme-default",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "semi-theme-default",
"keywords": [
"semi-theme",
Expand Down
14 changes: 7 additions & 7 deletions packages/semi-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-ui",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
"main": "lib/cjs/index.js",
"module": "lib/es/index.js",
Expand All @@ -20,12 +20,12 @@
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.1",
"@douyinfe/semi-animation": "2.57.0",
"@douyinfe/semi-animation-react": "2.57.0",
"@douyinfe/semi-foundation": "2.57.0",
"@douyinfe/semi-icons": "2.57.0",
"@douyinfe/semi-illustrations": "2.57.0",
"@douyinfe/semi-theme-default": "2.57.0",
"@douyinfe/semi-animation": "2.57.1-alpha.0",
"@douyinfe/semi-animation-react": "2.57.1-alpha.0",
"@douyinfe/semi-foundation": "2.57.1-alpha.0",
"@douyinfe/semi-icons": "2.57.1-alpha.0",
"@douyinfe/semi-illustrations": "2.57.1-alpha.0",
"@douyinfe/semi-theme-default": "2.57.1-alpha.0",
"async-validator": "^3.5.0",
"classnames": "^2.2.6",
"copy-text-to-clipboard": "^2.1.1",
Expand Down
6 changes: 4 additions & 2 deletions packages/semi-ui/slider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
getSliderLengths: () => {
if (this.sliderEl && this.sliderEl.current) {
const rect = this.sliderEl.current.getBoundingClientRect();
const offsetParentRect = this.sliderEl.current.offsetParent?.getBoundingClientRect();

const offset = {
x: this.sliderEl.current.offsetLeft,
y: this.sliderEl.current.offsetTop,
x: offsetParentRect ? (rect.left - offsetParentRect.left): this.sliderEl.current.offsetLeft,
y: offsetParentRect ? (rect.top - offsetParentRect.top) : this.sliderEl.current.offsetTop,
};
return {
sliderX: offset.x,
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-webpack-plugin",
"version": "2.57.0",
"version": "2.57.1-alpha.0",
"description": "",
"author": "伍浩威 <wuhaowei.whw@bytedance.com>",
"homepage": "",
Expand Down
Loading