Giter Club home page Giter Club logo

Comments (5)

scsmash3r avatar scsmash3r commented on July 24, 2024 6

It seems that this is the problem with a mask. I'm not familiar with react, nor with that one lib, but digging briefly through the code, it seems that the mask is used with eraser function.

Since you don't have an erasing element on your canvas, but "Undo" button instead, you could remove mask attribute from #react-sketch-canvas element to show whole canvas without that mask. For me it solves the problem on Firefox.

vokoscreenNG-2023-03-02_06-32-33.mp4

from scribble-diffusion.

scsmash3r avatar scsmash3r commented on July 24, 2024 3

This Greasemonkey script serves as a workaround on a client's side, but if added serverside, it can temporary solve the problem till the full-fledged fix :P

  // ==UserScript==
  // @name scribblediffusion canvas temp fix
  // @description Removes mask attr from canvas element for proper view in firefox
  // @match https://scribblediffusion.com/
  // @version   1.0.0
  // ==/UserScript==

  window.addEventListener('load', function () {
      var canvas_with_mask = document.querySelector("#react-sketch-canvas__stroke-group-0");
      canvas_with_mask.removeAttribute("mask");
  })

from scribble-diffusion.

zeke avatar zeke commented on July 24, 2024

I would love help from the community on this one!

from scribble-diffusion.

kcoderhtml avatar kcoderhtml commented on July 24, 2024

I can verify that the script @scsmash3r gave fixes the issue.

from scribble-diffusion.

zeke avatar zeke commented on July 24, 2024

Nice work! Thanks for your help on this.

https://twitter.com/zeke/status/1631507015863517184

from scribble-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.