question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

the text disppearing when cursor move into canvas

See original GitHub issue

when move cursor into canvas the text disappering in the canvas. the code is below,how to fix id.

$('canvas').drawRect({
                    layer: true,
                    draggable: true,
                    groups: ['shapes'],
                    dragGroups: ['shapes'],
                    fillStyle: statusColor,
                    x: x,
                    y: y,
                    width: 200, //494
                    height: 28, //70
                    data: {
                        name: title,
                        info: status
                    }
                })
                .drawText({
                    layer: true,
                    name: 'title',
                    fillStyle: '#fff',
                    strokeWidth: 1,
                    x: x,
                    y: y,
                    groups: ['shapes'],
                    dragGroups: ['shapes'],
                    fontSize: '12pt',
                    fontFamily: 'Helvetica',
                    text: title
                })
                .drawLayer();

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
qingxin2016commented, Dec 5, 2017

nice! thanks.

0reactions
caleb531commented, Dec 5, 2017

@qingxin2016

The way I would accomplish detecting a click-that-is-not-a-drag is to use flag variables combined with dragstart and dragstop callbacks:

click: function() {
  if (!this.isDragging) {
    // your code goes here
  }
},
dragstart: function() {
  this.isDragging = true;
},
dragstop: function() {
  this.isDragging = false;
}

You can’t use groups/dragGroups with draw() by itself, but you should certainly be able to if you create a custom jCanvas method using the Plugin API. See the drawHeart example from the docs (in particular, the $.jCanvas.detectEvents function is what you want): https://projects.calebevans.me/jcanvas/docs/extending/#example-drawheart

Read more comments on GitHub >

github_iconTop Results From Across the Web

CANVA SPECIAL REQUEST! How to fix the disappearing text ...
FREE CANVA PRO, for TEACHERS, SCHOOLS and STUDENTS Get Yours please click from the OFFICIAL LINK provided ...
Read more >
Mouse cursor disappears in any dialogue or text box or ...
So the issue is my mouse arrow disappears in any dialogue or text box or document . I mean its there but invisible...
Read more >
Disappearing Text - Canvas Community
Try typing (not copying and pasting) on a new canvas page, and saving just to make sure your text appears. Then go back...
Read more >
Disappearing text when other shapes are on canvas #199
It seems that when i add text onto the canvas as well as a draggable shape, the text will disappear once my cursor...
Read more >
Text box disappears over canvas - Adobe Support Community
You could also go into your Master Page in the Pages panel and delete the Text Frame there.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found