All Questions
14,229
questions
0
votes
0
answers
27
views
Why this tkinter GUI code behaves differently when inside a function?
This generate_GUI1 function does not generate some buttons on the GUI
# This file was generated by the Tkinter Designer by Parth Jadhav
# https://github.com/ParthJadhav/Tkinter-Designer
from pathlib ...
0
votes
1
answer
34
views
Prevent tap vibration after disabling right click context menu on HTML element?
I have this code, which works for disabling the context menu from appearing after right clicking an element:
function disableRightClick(e) {
e.preventDefault();
}
elem.addEventListener("...
0
votes
1
answer
20
views
How to fix bubbles when drawing with canvas?
Good afternoon. I have recently started learning programming and would like to get a little help. When writing code to display bubbles using canvas, it turns out that all the bubbles merge into a ...
-1
votes
2
answers
133
views
Img src not loading on page from local files
So, I am trying to add an imgsrc (logo) over a background to be later modified in ****.js for graphical/animation purposes. I am using vsc with the live server extension to see live progress(locally;...
1
vote
1
answer
14
views
How to set an Angular component's canvas size from model data
I have an angular component which contains a canvas, like so:
<canvas #canvas width="800px" height="600px" class="baseCanvas"></canvas>
shows up fine no ...
0
votes
0
answers
37
views
Drawings on canvas don't disappear and create weird visual effects [duplicate]
I've been trying to code a simple JavaScript game in which the user controls a square across a canvas in order to collect coins, scoring points. My intention is that when the user collects a coin, the ...
0
votes
1
answer
24
views
JSColor.hide() not working as expected on Android
I'm working on a website for doodling (https://dewdul.com/dewdul-board) and I've integrated JSColor (https://jscolor.com/docs/) library for color picking. My issue is that the default settings ...
0
votes
1
answer
42
views
Canvas zoom with CSS transformation
In the following code I have a problem with zooming. When the Mouse is on one position and I zoom to this position, everthing is fine. But when I move the Mouse to another position and zoom there, ...
0
votes
0
answers
14
views
HTML Canvas context is displaced / shifted on ios
So I'm working on a signature platform, and to handle the signature I wrote this method:
function CursorSign() {
console.log("Cursor Sign");
var canvas = document.getElementById(&...
0
votes
1
answer
34
views
Chart JS text centre in doughnut chart
I have a circle with text within my doughnut chart js, how can i centre the text, seems to be different position depending on screens.
Chart.pluginService.register({
beforeDraw: function(chart) {
...
1
vote
1
answer
51
views
Lines thick and blurry HTML canvas [duplicate]
I am drawing a simple grid, like so:
const canvas = document.getElementById('gridCanvas') as HTMLCanvasElement;
const context = canvas.getContext('2d') as CanvasRenderingContext2D;
// Define the size ...
2
votes
1
answer
41
views
JS Canvas - My clicked positions work on desktop, but aren't working properly on touchscreens
I'm doing a project, learning canvas.
My basic operations work (dragging mouse over the canvas to draw, clearing)
but when I switch to touch, it draws offset, like diagonally down and right from where ...
0
votes
1
answer
49
views
Cutout percentage in data chart
How would I add cutout percentage to my data chart in chart js, the aim id to make the chart thiner.
const data = {
labels: ['onek', 'teo', 'Three'],
datasets: [{
data: [1, 3, 9],
...
1
vote
1
answer
45
views
Add contents after the canvas
I am trying to build a webpage that display images related to the scroll. I am able to display content on top of the canvas and the animation worked fine.
What I am not able to do is add content AFTER ...
0
votes
0
answers
41
views
Javascript ARC drawing on canvas every timer update
I am working to create ARC moving animation.
For that I am trying to clear a canvas & draw arc on canvas every timer interval.
But i am failing in first step, Why arc is not drawing ?
HTML code :--...