mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #19247 from overleaf/mj-figure-snippet
[web] Default to half line width in figure snippet GitOrigin-RevId: 477ab7fec21a040a5974d807dde3604882c38c82
This commit is contained in:
parent
9f68bc5660
commit
c1ad4d237b
2 changed files with 5 additions and 5 deletions
|
@ -37,7 +37,7 @@ export const environments = new Map([
|
|||
'figure',
|
||||
`\\begin{figure}
|
||||
\t\\centering
|
||||
\t\\includegraphics{$1}
|
||||
\t\\includegraphics[width=0.5\\linewidth]{$1}
|
||||
\t\\caption{\${2:Caption}}
|
||||
\t\\label{\${3:fig:enter-label}}
|
||||
\\end{figure}`,
|
||||
|
|
|
@ -249,8 +249,8 @@ describe('<CodeMirrorEditor/> in Visual mode', function () {
|
|||
cy.get('@third-line').type('path/to/image')
|
||||
|
||||
cy.get('@third-line').should(
|
||||
'have.text',
|
||||
' \\includegraphics{path/to/image}'
|
||||
'contain.text',
|
||||
' \\includegraphics[width=0.5\\linewidth]{path/to/image}'
|
||||
)
|
||||
|
||||
// move the cursor out of the figure
|
||||
|
@ -258,8 +258,8 @@ describe('<CodeMirrorEditor/> in Visual mode', function () {
|
|||
|
||||
// Should be removed from dom when line is hidden
|
||||
cy.get('.cm-content').should(
|
||||
'not.contain',
|
||||
'\\includegraphics{path/to/image}'
|
||||
'not.contain.text',
|
||||
'\\includegraphics[width=0.5\\linewidth]{path/to/image}'
|
||||
)
|
||||
|
||||
cy.get('img.ol-cm-graphics').should('have.attr', 'src', 'path/to/image')
|
||||
|
|
Loading…
Reference in a new issue