Skip to content

Commit

Permalink
updated the MiniPaint service
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeriaMaltseva committed Dec 10, 2024
1 parent 45c1faa commit 2661336
Show file tree
Hide file tree
Showing 10 changed files with 1,952 additions and 1,979 deletions.
11 changes: 10 additions & 1 deletion assets/js/src/core/services/mini-paint/mini-paint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@
* @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
*/

import React from 'react'
import React, { useState } from 'react'
import { useElementContext } from '@Pimcore/modules/element/hooks/use-element-context'

export const MiniPaint = (): React.JSX.Element => {
const { id } = useElementContext()

const [isLoaded, setIsLoaded] = useState(false)

const iframeSrc = `/pimcore-studio/api/image-editor?id=${id}`

const handleIframeLoad = (): void => {
setIsLoaded(true)
}

return (
<div style={ { width: '100%', height: '100%' } }>
{!isLoaded && <div>Loading...</div>}
<iframe
height={ '100%' }
onLoad={ handleIframeLoad }
src={ iframeSrc }
style={ { display: isLoaded ? 'block' : 'none' } }
title="MiniPaint editor"
width={ '100%' }
/>
Expand Down
14 changes: 14 additions & 0 deletions public/build/105fec21-ade0-437d-b6fe-ab1010a8f890/entrypoints.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entrypoints": {
"main": {
"css": [
"http://localhost:3030/build/105fec21-ade0-437d-b6fe-ab1010a8f890/vendors-node_modules_dnd-kit_modifiers_dist_modifiers_esm_js-node_modules_dnd-kit_sortable_di-41eabe.css",
"http://localhost:3030/build/105fec21-ade0-437d-b6fe-ab1010a8f890/main.css"
],
"js": [
"http://localhost:3030/build/105fec21-ade0-437d-b6fe-ab1010a8f890/vendors-node_modules_dnd-kit_modifiers_dist_modifiers_esm_js-node_modules_dnd-kit_sortable_di-41eabe.js",
"http://localhost:3030/build/105fec21-ade0-437d-b6fe-ab1010a8f890/main.js"
]
}
}
}
1,928 changes: 1,928 additions & 0 deletions public/build/105fec21-ade0-437d-b6fe-ab1010a8f890/manifest.json

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions public/build/68149aca-3dd2-478e-911c-0198298e1019/entrypoints.json

This file was deleted.

1,928 changes: 0 additions & 1,928 deletions public/build/68149aca-3dd2-478e-911c-0198298e1019/manifest.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions public/build/de583035-1ea8-49bc-9ece-69ffabbf486d/entrypoints.json

This file was deleted.

0 comments on commit 2661336

Please sign in to comment.