Skip to content

Commit d3a3a89

Browse files
committed
rotation removed
1 parent b9c42b5 commit d3a3a89

File tree

5 files changed

+18
-24
lines changed

5 files changed

+18
-24
lines changed

client/packages/lowcoder/src/comps/comps/carouselComp.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { formDataChildren, FormDataPropertyView } from "./formComp/formDataConst
1111
import { PositionControl } from "comps/controls/dropdownControl";
1212
import { useRef, useState } from "react";
1313
import ReactResizeDetector from "react-resize-detector";
14-
import { ArrayStringControl, StringControl } from "comps/controls/codeControl";
14+
import { ArrayStringControl } from "comps/controls/codeControl";
1515
import { styleControl } from "comps/controls/styleControl";
1616
import { AnimationStyle, AnimationStyleType, CarouselStyle } from "comps/controls/styleControlConstants";
1717

@@ -25,12 +25,11 @@ const CarouselItem = styled.div<{ $src: string }>`
2525
background-size: contain;
2626
`;
2727

28-
const Container = styled.div<{$bg: string; $rotation: string; $animationStyle:AnimationStyleType}>`
28+
const Container = styled.div<{$bg: string; $animationStyle:AnimationStyleType}>`
2929
&,
3030
.ant-carousel {
3131
height: 100%;
3232
background-color: ${(props) => props.$bg};
33-
rotate: ${(props) => props.$rotation};
3433
${props=>props.$animationStyle}
3534
}
3635
`;
@@ -47,7 +46,6 @@ let CarouselBasicComp = (function () {
4746
dotPosition: withDefault(PositionControl, "bottom"),
4847
style: styleControl(CarouselStyle),
4948
animationStyle: styleControl(AnimationStyle),
50-
restrictPaddingOnRotation:withDefault(StringControl, 'imageCarousel'),
5149
...formDataChildren,
5250
};
5351
return new UICompBuilder(childrenMap, (props) => {
@@ -62,7 +60,6 @@ let CarouselBasicComp = (function () {
6260
<Container
6361
ref={containerRef}
6462
$bg={props.style.background}
65-
$rotation={props.style.rotation}
6663
$animationStyle={props.animationStyle}
6764
>
6865
<ReactResizeDetector onResize={onResize}>

client/packages/lowcoder/src/comps/comps/fileViewerComp.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { DocumentViewer } from "react-documents";
66
import styled, { css } from "styled-components";
77
import { Section, sectionNames } from "lowcoder-design";
88
import { StringControl } from "../controls/codeControl";
9-
import { UICompBuilder, withDefault } from "../generators";
9+
import { UICompBuilder } from "../generators";
1010
import { NameConfig, NameConfigHidden, withExposingConfigs } from "../generators/withExposing";
1111
import { hiddenPropertyView } from "comps/utils/propertyUtils";
1212
import { trans } from "i18n";
@@ -20,7 +20,6 @@ const getStyle = (style: FileViewerStyleType) => {
2020
height: ${heightCalculator(style.margin)};
2121
margin: ${style.margin};
2222
padding: ${style.padding};
23-
rotate: ${style.rotation};
2423
2524
overflow: hidden;
2625
background-color: ${style.background};
@@ -70,7 +69,6 @@ let FileViewerBasicComp = (function () {
7069
src: StringControl,
7170
style: styleControl(FileViewerStyle),
7271
animationStyle: styleControl(AnimationStyle),
73-
restrictPaddingOnRotation: withDefault(StringControl, 'fileViewer'),
7472
};
7573
return new UICompBuilder(childrenMap, (props) => {
7674
if (isEmpty(props.src)) {

client/packages/lowcoder/src/comps/comps/mediaComp/videoComp.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ import { NameConfig, NameConfigHidden, withExposingConfigs } from "../../generat
66
import { RecordConstructorToView } from "lowcoder-core";
77
import { useRef, useState } from "react";
88
import { styleControl } from "comps/controls/styleControl";
9-
import { AnimationStyle, AnimationStyleType, AudioStyle, ImageStyle, ImageStyleType } from "comps/controls/styleControlConstants";
9+
import {
10+
AnimationStyle,
11+
AnimationStyleType,
12+
VideoStyle,
13+
} from 'comps/controls/styleControlConstants';
1014
import { BoolControl } from "comps/controls/boolControl";
1115
import { withDefault } from "../../generators/simpleGenerators";
1216
import { playIcon } from "lowcoder-design";
13-
import { RangeControl, StringControl } from "../../controls/codeControl";
17+
import { RangeControl } from "../../controls/codeControl";
1418
import { hiddenPropertyView } from "comps/utils/propertyUtils";
1519
import { trans } from "i18n";
1620
import { Video } from "lowcoder-design";
@@ -108,19 +112,18 @@ const ContainerVideo = (props: RecordConstructorToView<typeof childrenMap>) => {
108112
};
109113

110114
const childrenMap = {
111-
src: withDefault(StringStateControl, trans("video.defaultSrcUrl")),
112-
poster: withDefault(StringStateControl, trans("video.defaultPosterUrl")),
115+
src: withDefault(StringStateControl, trans('video.defaultSrcUrl')),
116+
poster: withDefault(StringStateControl, trans('video.defaultPosterUrl')),
113117
onEvent: eventHandlerControl(EventOptions),
114-
style: styleControl(AudioStyle),
118+
style: styleControl(VideoStyle),
115119
animationStyle: styleControl(AnimationStyle),
116120
autoPlay: BoolControl,
117121
loop: BoolControl,
118122
controls: BoolControl,
119123
volume: RangeControl.closed(0, 1, 1),
120124
playbackRate: RangeControl.closed(1, 2, 1),
121-
currentTimeStamp: numberExposingStateControl("currentTimeStamp", 0),
122-
duration: numberExposingStateControl("duration"),
123-
restrictPaddingOnRotation:withDefault(StringControl, 'video'),
125+
currentTimeStamp: numberExposingStateControl('currentTimeStamp', 0),
126+
duration: numberExposingStateControl('duration'),
124127
...mediaCommonChildren,
125128
};
126129

client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,6 @@ export const FileViewerStyle = [
15561556
MARGIN,
15571557
PADDING,
15581558
BORDER_WIDTH,
1559-
ROTATION
15601559
] as const;
15611560

15621561
export const IframeStyle = [
@@ -1691,6 +1690,8 @@ export const AudioStyle = [
16911690
ROTATION,
16921691
] as const;
16931692

1693+
export const VideoStyle = [MARGIN, PADDING] as const;
1694+
16941695
export const IconStyle = [
16951696
getStaticBackground("#00000000"),
16961697
getStaticBorder("#00000000"),
@@ -1930,7 +1931,7 @@ export const NavLayoutItemActiveStyle = [
19301931
},
19311932
] as const;
19321933

1933-
export const CarouselStyle = [getBackground("canvas"),ROTATION] as const;
1934+
export const CarouselStyle = [getBackground("canvas")] as const;
19341935

19351936
export const RichTextEditorStyle = [
19361937
getStaticBorder(),
@@ -2012,6 +2013,7 @@ export type CircleProgressType = StyleConfigType<typeof CircleProgressStyle>;
20122013
export type NavigationStyleType = StyleConfigType<typeof NavigationStyle>;
20132014
export type ImageStyleType = StyleConfigType<typeof ImageStyle>;
20142015
export type AudioStyleType = StyleConfigType<typeof AudioStyle>;
2016+
export type VideoStyleType = StyleConfigType<typeof VideoStyle>;
20152017
export type IconStyleType = StyleConfigType<typeof IconStyle>;
20162018
export type ListViewStyleType = StyleConfigType<typeof ListViewStyle>;
20172019
export type JsonSchemaFormStyleType = StyleConfigType<

client/packages/lowcoder/src/comps/generators/uiCompBuilder.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,8 @@ function UIView(props: {
267267
? rotationVal !== '' && rotationVal !== '0deg'?'35% 0px':'0px'
268268
: restrictPaddingOnRotationVal === 'image'
269269
? rotationVal !== '' && rotationVal !== '0deg'?'10% 0px':'0px'
270-
: restrictPaddingOnRotationVal === 'imageCarousel'
271-
? rotationVal !== '' && rotationVal !== '0deg'?'35% 0px':'0px'
272-
: restrictPaddingOnRotationVal === 'fileViewer'
273-
? rotationVal !== '' && rotationVal !== '0deg'?'65% 0px':'0px'
274270
: restrictPaddingOnRotationVal === 'controlButton'
275271
? rotationVal !== '' && rotationVal !== '0deg'?'10% 0px':'0px'
276-
: restrictPaddingOnRotationVal === 'video'
277-
? rotationVal !== '' && rotationVal !== '0deg'?'26% 0px':'0px'
278272
: '0px' // Both rotation and box-shadow are empty or restricted
279273
: rotationVal !== '' && rotationVal !== '0deg' // Rotation applied
280274
? boxShadowVal === null ||

0 commit comments

Comments
 (0)