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: cell margin bottom should over 1 #3595

Merged
merged 1 commit into from
Sep 26, 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
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export interface IDocumentLayoutObject {

export const DEFAULT_PADDING_DATA = {
t: 0,
b: 1,
b: 2, // must over 1, see https://github.com/dream-num/univer/issues/2727
l: 2,
r: 2,
};
Expand Down Expand Up @@ -1931,12 +1931,7 @@ export class SpreadsheetSkeleton extends Skeleton {
const contentLength = content.length;
const {
textRotation,
paddingData = {
t: 0,
r: 2,
b: 2, // must over 1, see https://github.com/dream-num/univer/issues/2727
l: 2,
},
paddingData = DEFAULT_PADDING_DATA,
horizontalAlign = HorizontalAlign.UNSPECIFIED,
verticalAlign = VerticalAlign.UNSPECIFIED,
wrapStrategy = WrapStrategy.UNSPECIFIED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const richTextDemo: IDocumentData = {
wrapStrategy: 0,
},
marginTop: 0,
marginBottom: 1,
marginBottom: 2,
marginRight: 2,
marginLeft: 2,
},
Expand Down Expand Up @@ -361,7 +361,7 @@ describe('Test EndEditController', () => {
width: 320.4903259277344,
},
marginTop: 0,
marginBottom: 1,
marginBottom: 2,
marginRight: 2,
marginLeft: 2,
renderConfig: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import type { ICellData, Injector, IStyleData, Nullable, Univer } from '@univerjs/core';
import { ICommandService, IUniverInstanceService, LocaleType, RANGE_TYPE } from '@univerjs/core';
import {
AddWorksheetMergeMutation,
Expand All @@ -27,9 +26,10 @@ import {
SheetsSelectionsService,
} from '@univerjs/sheets';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ICellData, Injector, IStyleData, Nullable, Univer } from '@univerjs/core';

import { ISheetClipboardService } from '../clipboard.service';
import { SheetSkeletonManagerService } from '../../sheet-skeleton-manager.service';
import { ISheetClipboardService } from '../clipboard.service';
import { clipboardTestBed } from './clipboard-test-bed';
import { excelSample } from './constant';

Expand Down Expand Up @@ -164,7 +164,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import type { ICellData, Injector, IStyleData, Nullable, Univer } from '@univerjs/core';
import { ICommandService, IUniverInstanceService, LocaleType, RANGE_TYPE } from '@univerjs/core';
import {
AddWorksheetMergeMutation,
Expand All @@ -27,11 +26,12 @@ import {
SheetsSelectionsService,
} from '@univerjs/sheets';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';

import { ISheetClipboardService } from '../clipboard.service';
import type { ICellData, Injector, IStyleData, Nullable, Univer } from '@univerjs/core';

import { SheetSkeletonManagerService } from '../../sheet-skeleton-manager.service';

import { ISheetClipboardService } from '../clipboard.service';

import { clipboardTestBed } from './clipboard-test-bed';

import { googleSample } from './constant';
Expand Down Expand Up @@ -165,7 +165,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import type { ICellData, Injector, IRange, IStyleData, Nullable, Univer } from '@univerjs/core';
import { ICommandService, IUniverInstanceService, RANGE_TYPE, Rectangle, RedoCommand, UndoCommand } from '@univerjs/core';
import {
AddWorksheetMergeMutation,
Expand All @@ -27,13 +26,14 @@ import {
SheetsSelectionsService,
} from '@univerjs/sheets';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ICellData, Injector, IRange, IStyleData, Nullable, Univer } from '@univerjs/core';

import { discreteRangeToRange } from '../../../controllers/utils/range-tools';
import { ISheetClipboardService, PREDEFINED_HOOK_NAME } from '../clipboard.service';
import { COPY_TYPE } from '../type';
import { discreteRangeToRange } from '../../../controllers/utils/range-tools';
import { clipboardTestBed } from './clipboard-test-bed';
import type { IClipboardItem } from './mock-clipboard';
import { MockClipboard } from './mock-clipboard';
import type { IClipboardItem } from './mock-clipboard';

describe('Test clipboard', () => {
let univer: Univer;
Expand Down Expand Up @@ -176,7 +176,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -249,7 +249,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -322,7 +322,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -399,7 +399,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -443,7 +443,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -527,7 +527,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -571,7 +571,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -693,7 +693,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -831,7 +831,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down Expand Up @@ -958,7 +958,7 @@ describe('Test clipboard', () => {
s: 0,
},
pd: {
b: 1,
b: 2,
l: 2,
r: 2,
t: 0,
Expand Down
Loading