Docsify: Zoom image plugin: only content / ignore linked

Created on 7 Jun 2018  路  3Comments  路  Source: docsifyjs/docsify

The zoom image plugin currently targets all images except for emoji and those with data-no-zoom attribute.

https://github.com/QingWei-Li/docsify/blob/6c7ebc989dd1572f744fbe5fc8f5af710b790cce/src/plugins/zoom-image.js#L11

Two additional scenarios should excluded by default:

  1. Images outside of the main content area.
  2. Linked images (Ex: <a href="#"><img src="image.jpg"></a>)

I've added a fix-via-plugin to docsify-themeable, but it requires removing all event listeners via cloning the image node which is less than ideal.

Ideally these scenarios would be handled by default.

Thanks!

Most helpful comment

At least being able to exclude the logo from zoom would help. I had to remove the zoom image plugin.

All 3 comments

At least being able to exclude the logo from zoom would help. I had to remove the zoom image plugin.

I agree with @billhennessy here, i'm having the same issue with the logo being zoom activated ... has there been at least a solution for this issue ?

I'm having the same problem with logo zoom. As of now I removed the plugin and linked to image file directly. I had a similar idea with removing event listeners by cloning the node but it wasn't elegant...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

toavinar picture toavinar  路  3Comments

nothingrandom picture nothingrandom  路  5Comments

patrickboulay picture patrickboulay  路  4Comments

petrdvorak picture petrdvorak  路  3Comments

smlbiobot picture smlbiobot  路  5Comments