html5-canvas


Drag clickable URL in HTML5 Canvas


There are lots of pages that tell me how to drag a shape or image across a canvas, even drag text. However, I want to drag texts in the form of clickable HTML URLs (hyperlinks), i.e., to group several on the one canvas to give an impression of relevancy (the closer the links to each other, the more closely they are related. (being HTML links, only their titles will be visible - the actual URLs will be hidden).
The first problem that arises is whether I can use a single left-click to either activate the link (take me to another page) or have it interpreted as the beginning of a drag. Probably I will have to use a different hotkey, such as a r-click to drag, a l-click to activate. I don't want to have to double-click to activate - an extra click becomes tedious.
I haven't found anything that specifically addresses this problem, either in this forum or elsewhere, so would be grateful for suggestions as to how to go about implementing this form of drag-and-drop. Thanks.
Moving your link will essentially be the same as moving an image. Canvas has no URL componentant or tag element - you'd have to create your own.
So you're pretty much just going to create a button with an onclick event that will call the URL associated with that button.

Related Links

HTML5 - Canvas available contexts
erase line in canvas with image background
Fabric toDataUrl with multiplier not working as expected
Intercction objects fabric.js
How to align fabric.Image objects horizontally?
Draw line from one dot to another using mouse event
waving flag waving flag
Fill rectangle with stretched image with Fabricjs
taking a 'snapshot' of babylonjs scene sometimes works, sometimes doesn't
Speed html5 canvas
graphics.bf(img.image).s().p(“xxx…”) can't show image correctly
WebGL Clears Between Each setInterval [duplicate]
Stroke Effect on Arabic Text At Junctions
In HTML Canvas can a single path have different stroke properties?
Custom globalCompositeOperation in html5 Canvas
Share Canvas as image using FabricJS

Categories

HOME
elastic-beanstalk
uwp
servlets
applet
isis
amazon-kinesis
redhat
jasypt
restsharp
ibm-midrange
classloader
jena
overloading
vulkan
export-to-excel
jsqmessagesviewcontroller
aar
prerender
stackexchange-api
ssrs-2008
cmusphinx
silk-performer
slime
jpos
accelerated-mobile-page
similarity
spark-graphx
datamatrix
azure-ad-graph-api
hawq
smallbasic
android-button
angular-ngmodel
svn2git
apex-code
api-doc
dsx
eve
worldpay
projection
ulimit
freerdp
pci
freecodecamp
multisite
infiniband
unityscript
biological-neural-network
billing
angular-directive
android-camera-intent
perspective
hapi.js
jsbin
jasny-bootstrap
xendesktop
cufft
hl7-v2
dual-table
devenv
solr-boost
ehcache-bigmemory
sslv3
kue
imake
computer-science-theory
gdk
knockout-mvc
linguistics
notifydatasetchanged
aps
fig
angularjs-google-maps
colormatrix
scrollpane
uptime
sizzle
shebang
locomotivejs
guvnor
openid4java
settings.bundle
xmltextwriter
orthographic
.net-1.1
alivepdf
nsindexset
regexbuddy
posterous
geneva-framework
eclipse-tptp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App