Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/130629
Change subject: render.article: Fix image placement on non-SVG browsers ...................................................................... render.article: Fix image placement on non-SVG browsers Bug: 64598 Change-Id: I9e3434330a0c51e625921f6255119ff96deccbc6 --- M resources/ext.popups.core.less M resources/ext.popups.renderer.article.js 2 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/29/130629/1 diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less index 3124952..0fa0901 100644 --- a/resources/ext.popups.core.less +++ b/resources/ext.popups.core.less @@ -53,6 +53,7 @@ } > div.mwe-popups-is-tall { + margin: 0; height: 250px; width: 200px; padding: 0; @@ -64,6 +65,7 @@ } > div.mwe-popups-is-not-tall { + margin: 0; height: 200px; width: 300px; padding: 0; diff --git a/resources/ext.popups.renderer.article.js b/resources/ext.popups.renderer.article.js index f3a665f..587ca72 100644 --- a/resources/ext.popups.renderer.article.js +++ b/resources/ext.popups.renderer.article.js @@ -357,6 +357,7 @@ */ article.processPopup = function ( link ) { var + svg = mw.popups.supportsSVG, cache = mw.popups.render.cache [ link.attr( 'href' ) ], popup = mw.popups.$popup, tall = cache.settings.tall, @@ -364,31 +365,36 @@ flippedY = cache.settings.flippedY, flippedX = cache.settings.flippedX; + if ( !svg && flippedY && !tall ) { + $( '.mwe-popups-extract' ).css( 'margin-top', '206px' ); + + } + if ( flippedY ) { popup.css( { top: popup.offset().top - ( popup.outerHeight() + 50 ) } ); } - if ( flippedY && thumbnail ) { + if ( flippedY && thumbnail && svg ) { mw.popups.$popup .find( 'image' )[ 0 ] .setAttribute( 'clip-path', '' ); } - if ( flippedY && flippedX && thumbnail && tall ) { + if ( flippedY && flippedX && thumbnail && tall && svg ) { mw.popups.$popup .find( 'image' )[ 0 ] .setAttribute( 'clip-path', 'url(#mwe-popups-landscape-mask-flip)' ); } - if ( flippedX && !flippedY && thumbnail && !tall ) { + if ( flippedX && !flippedY && thumbnail && !tall && svg ) { mw.popups.$popup .find( 'image' )[ 0 ] .setAttribute( 'clip-path', 'url(#mwe-popups-mask-flip)' ); } - if ( flippedX && !flippedY && thumbnail && tall ) { + if ( flippedX && !flippedY && thumbnail && tall && svg ) { mw.popups.$popup .removeClass( 'mwe-popups-no-image-tri' ) .find( 'image' )[ 0 ] -- To view, visit https://gerrit.wikimedia.org/r/130629 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e3434330a0c51e625921f6255119ff96deccbc6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna <psax...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits