slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Unable to annotate on image

Open lyqht opened this issue 4 years ago • 3 comments

Describe the bug I am unable to annotate on an image. A GIF is provided below where I can annotate other parts of the slide but not on top of the image.

To Reproduce slidev-unable-to-annotate-on-images

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Google Chrome
  "dependencies": {
    "@slidev/cli": "^0.27.10",
    "@slidev/theme-default": "*",
    "@slidev/theme-seriph": "*",
    "slidev-theme-penguin": "^1.1.2",
    "vite-svg-loader": "^3.0.0"
  },

lyqht avatar Nov 08 '21 14:11 lyqht

Probably a z-index issue? (I guess it could be related to your theme) If you find a way to fix it, PR is welcome.

antfu avatar Nov 14 '21 10:11 antfu

As I have met this bug on my theme, the cause of the problem is z-index. penguin set the z-index of default contents as 10, which maybe higher than the ink layer. You may also noticed that the ink can be obscured by the text.

# default.vue
<div class="my-auto z-10">
      <slot />
</div>

It can be solved by set the layer below 0, like -z-10. And I recommend setting the z-index of the ink layers to a very large value by default ink under the text .

isaaccaa avatar Mar 04 '22 13:03 isaaccaa

This should now be fixed. Can you confirm ?

tonai avatar May 25 '22 11:05 tonai