Commit fe29b121 authored by Яков's avatar Яков
Browse files

update fix issue

parent a6d105fb
{
"name": "react-ag-qeditor",
"version": "1.1.69",
"version": "1.1.70",
"description": "WYSIWYG html editor",
"author": "atma",
"license": "MIT",
......
......@@ -1672,7 +1672,8 @@ const QEditor = ({
img.src = file.path
img.onload = () => {
const maxWidth = editor.view.dom.clientWidth - 32 // учёт padding
const domWidth = editor.view.dom.clientWidth
const maxWidth = domWidth > 0 ? domWidth - 32 : img.naturalWidth
const realWidth = Math.min(img.naturalWidth, maxWidth)
const realHeight = img.naturalHeight * (realWidth / img.naturalWidth)
......
......@@ -717,8 +717,7 @@ export const InteractiveImage = Node.create({
: style.push('display: block', 'margin-left: auto');
}
if (width) style.push(`width: ${width}px`);
if (height) style.push(`height: ${height}px`);
if (width) style.push(`width: ${width}px`, 'max-width: 100%');
return [
'interactive-image',
......
......@@ -918,17 +918,17 @@ body{
}
&-list{
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
gap: 10px;
max-height: 280px;
max-height: min(280px, calc(90dvh - 440px));
overflow-y: auto;
padding-right: 4px;
}
&-item{
position: relative;
width: 100px;
width: 100%;
aspect-ratio: 16 / 9;
background-color: #e8eaed;
border-radius: 6px;
......@@ -965,9 +965,7 @@ body{
&.is-audio,
&.is-file{
aspect-ratio: auto;
width: auto;
max-width: 160px;
min-width: 80px;
width: 100%;
height: auto;
background-image: none !important;
background-color: #F5F7FA;
......@@ -977,7 +975,7 @@ body{
}
&.is-video{
width: 240px;
width: 100%;
aspect-ratio: 16 / 9;
background-color: #000;
background-image: none !important;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment