jvs-ppt-ui 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,17 @@ import CanvasShapeElement from './CanvasShapeElement.vue'
5
5
  import CanvasLineElement from './CanvasLineElement.vue'
6
6
  import CanvasImageElement from './CanvasImageElement.vue'
7
7
  import SvgChart from '../../SvgChart.vue'
8
- import { getElementImageSrc, hasElementFill, hasElementBorder, getElementDropShadowFilter, isImagePlaceholder } from '../../../utils/canvas/elementStyles'
8
+ import {
9
+ getElementImageSrc,
10
+ getElementPattern,
11
+ isElementPatternTile,
12
+ getElementPatternTileSize,
13
+ getElementGradientCss,
14
+ hasElementFill,
15
+ hasElementBorder,
16
+ getElementDropShadowFilter,
17
+ isImagePlaceholder
18
+ } from '../../../utils/canvas/elementStyles'
9
19
 
10
20
  const props = defineProps<{
11
21
  element: any
@@ -164,7 +174,11 @@ function sortGroupElements(elements: any[]) {
164
174
  <!-- Child Chart -->
165
175
  <template v-else-if="child.type === 'chart'">
166
176
  <div style="width: 100%; height: 100%; overflow: visible; box-sizing: border-box;" :style="{
167
- backgroundColor: child.style?.fill || 'transparent',
177
+ backgroundColor: (getElementPattern(child) || getElementGradientCss(child)) ? 'transparent' : (child.style?.fill || 'transparent'),
178
+ backgroundImage: getElementPattern(child) ? `url('${getElementPattern(child)}')` : (getElementGradientCss(child) || 'none'),
179
+ backgroundSize: getElementPattern(child) ? (isElementPatternTile(child) ? `${getElementPatternTileSize(child).w}px ${getElementPatternTileSize(child).h}px` : 'cover') : undefined,
180
+ backgroundPosition: getElementPattern(child) ? (isElementPatternTile(child) ? '0 0' : 'center center') : undefined,
181
+ backgroundRepeat: getElementPattern(child) ? (isElementPatternTile(child) ? 'repeat' : 'no-repeat') : undefined,
168
182
  borderWidth: child.style?.borderWidth || '0px',
169
183
  borderStyle: child.style?.borderStyle || 'solid',
170
184
  borderColor: child.style?.borderColor || 'transparent',
@@ -99,12 +99,13 @@ function seekAudio(e: MouseEvent, id: string) {
99
99
  <video
100
100
  :id="`video-player-${element.id}`"
101
101
  :src="element.content"
102
+ :poster="(element as any).poster"
102
103
  controls
103
104
  :autoplay="element.autoplay"
104
105
  :style="{
105
106
  width: '100%',
106
107
  height: '100%',
107
- objectFit: 'contain',
108
+ objectFit: (element.style as any)?.objectFit || 'contain',
108
109
  background: '#000',
109
110
  borderRadius: element.style?.borderRadius || '4px',
110
111
  pointerEvents: (isSelected || isPresenting) ? 'auto' : 'none'