FabricJS, How to implement touch controls in fabric js - fabricjs

I have tried the answer from:
https://stackoverflow.com/a/45131912/12114516
But, when I try to drag my canvas around, only blue box appear. So I tried to console log when touch even was registered, and that did not work. This blue drag box covers touch command
This is what I see when i try to drag:
ANSER IS HERE:
I digged around for a bit and found out that the demo:http://fabricjs.com/touch-events
IS USING ANOTHER JS FILE: http://fabricjs.com/lib/fabric_with_gestures.js so what I just go to that website, ctrl+a, ctrl+c, make a new script file, ctrl+v and link my default-fabric js file from html to the new js file instead so how my script src looks like this:
<script src="/script/fabric_with_touch.js"></script>
Remeber that "fabric_with_touch.js" is a file I created and copy and pasted the website contents into. And don't worry, it won't mess with your mouse or keyboard controls.

Welp, I digged around for a bit and found out that the demo:http://fabricjs.com/touch-events
IS USING ANOTHER JS FILE:
http://fabricjs.com/lib/fabric_with_gestures.js
so what I just go to that website, ctrl+a, ctrl+c, make a new script file, ctrl+v
and link my default-fabric js file from html to the new js file instead
so how my script src looks like this:
<script src="/script/fabric_with_touch.js"></script>
Remeber that "fabric_with_touch.js" is a file I created and copy and pasted the website contents into.
And don't worry, it won't mess with your mouse or keyboard controls, I have tried that too

Related

MGCB Content Builder Won't Launch Properly

I'm trying to use the Monogame Content Builder in Linux with VS Code. I installed this extension in order to easily run the Content.mgcb file, but when I right click the file, the option to run it doesn't appear. Alternatively, when I run dotnet mgcb-editor in the terminal, this window shows up, but there's no option to import a file or do anything! This is what it looks like:
What am I doing wrong? Why won't the extension work, and why won't the the editor open properly? I'm pretty sure the editor should look like this (this image is from a tutorial).
The Linux GTK version displays differently than the windows version.
Use the New button(Leftmost on Bar) or Open button to specify the .mgcb file in the project folder.
Once a file is open, the Bar adds buttons on the left for Build, Rebuild and Clean and Save on the right.
Right-Click the Content node under project to Add existing or add new or build.

how i can change the default icon in the left of the window in Mac OS?

Now I want to design a simple game by using python, the step I want to do is to add an icon on the left of the window.
However, when I type
game_window.iconbitmap('favicon.ico')
game_window.mainloop()
the system just tell me Document Drag Error.
I am sure I save favicon and the both in the desktop and both of the path is correct.
I search this question in the internet but all of them are using window os.
If your icon is in the same folder as your file, the script will surely work...
I think that you're getting the error because you didn't save the file you're working on for the first time.
Try the following:
Save your file in the same folder another time (if you've already done it).
If it doesn't work, then write the full path of the icon

Drag from desktop/folder to GUI

I searched for this online but couldn't find any answer related to my problem.
My idea is to create a Python GUI with tkinter which could read text files from dragging from the desktop or a folder to the GUI itself, like for example on facebook (PC) you can drag images or text files to a chat and it processes it as a file.
Is there any way I could know what is my mouse dragging or clicking (outside the GUI) so I could save it on a variable? Or a library which has already that functionality?

Are there libraries or existing methods to get a webpage's layout from the html and css?

From the html and css files of a webpage, is there a way to write a program that can guess how the page might be visually structured?
can try saving to website by right click and save webpage or save as, then open up in a program like dreamweaver.

Spry menu doesnt work on another server

I created a few linked pages on dreamweaver. When I send them all through a zipped file to another computer to test it, the image on all pages works fine. However the spry menu does not appear. Instead, all the text from the menu appears vertically down the page, despite including all of the spry assets in the zip file.
Anybody know how I can fix this or have an idea of where i am going wrong?
If all of the menu code is appearing as a list, it means that the page is not finding the Spry CSS and/or JS files. Check the calls to those files in the HTML again.

Resources