gotcha

Author Topic: Multiple Links Within 1 Image  (Read 1567 times)

October 09, 2017, 08:12:37 AM
Read 1567 times

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7
Hello,

First time poster here. Began using Inkscape a few weeks ago solely to get an html file that contains links within the image, ie. an svg file.

I was initially successful a few weeks ago in the following test:

1. opened image
2. created rectangle over an area that I wanted a link
3. did a right-click on the rectangle and selected Create Link
4. inserted the URL address into the Href field
5. repeated steps 2 - 4 for another link
6. saved as an .svg file to my desktop
7. double-clicked file and opened successfully, as did the two aforementioned links

Attempts to re-create yesterday failed over and over.
1. creating first rectangle and subsequent link were fine.
2. when attempting to create a second link, the Create Link was no active

* I've uninstalled/reinstalled inkscape - same result
* Attempted rectangles and links w/another image - same result
* reviews of XML Editor indicate that rectangles are being made successfully, but unable to link them(once that first rectangle-link is made)
* is something being locked up that I'm unaware of or ?

For a visual, I've attached the image I'm working with.

Please advise.
Thank you.
Craig

 
  • .92
  • Windows 7

October 09, 2017, 10:02:45 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Can you provide the SVG file, or an example file which is showing the same problem?  I can't get enough information from the JPG, to learn the cause of the problem.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 09, 2017, 10:16:06 AM
Reply #2

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7
  Of course.  Please find the attached .svg file

Upon opening, the active link is set to "J Norkus 1889-1980."

The other test person was Joachim Caspar Reppin(right side). Isolating the rectangles a few weeks ago was successful.
It appears, now, that while rectangles are being made the link is being associated with the broader image boundary itself.
Meaning, you can move the cursor anywhere around the broader image and it be selectable - resulting in it going to J Norkus URL.

8 )

Thank you.

  • .92
  • Windows 7

October 09, 2017, 10:21:20 AM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok, that sounds like you accidentally applied the link to the larger object.  But I will look at the file to be sure.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 09, 2017, 10:39:20 AM
Reply #4

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7
Exactly. I tried to see if I could unrelated the link to the overall image somehow but couldn't figure out how.

I very much appreciate your time and effort in looking into this for me.

  • .92
  • Windows 7

October 09, 2017, 10:51:29 AM
Reply #5

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7
  Some followup information relative to the link being associated with the overall image versus a newly created rectangle(see attached screen cap):

just wanted to let you know that the first link was created after right-clicking within the newly created rectangle. Again....not sure why it's linking the entire image.



  • .92
  • Windows 7

October 09, 2017, 11:11:00 AM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yep, you solved your own problem!  The whole gray object, which is an imported JPEG was the link.  Here are some suggestions.

The reason clicking on the rectangle selected the whole JPEG is because the rectangle has no fill color.  So you have be careful about positioning the mouse over just the stroke (outline).  But I'll tell you one way you can avoid that.  There are other ways, so if this won't work, we can try others.

First, delete the 2 rectangles which you've drawn.  It's not absolutely necessary, but just to make a clean start.

 -- Select the JPEG
 -- right-click > Remove Link

Hhm, I see you have a root layer there.  To avoid confusion (and help facilitate easier selecting without catching the whole JPEG), let's get rid of the root layer:

 -- Layer menu > Add Layer (This will create Layer 1.  You can give it another name if you like.)
 -- Select the imported JPEG
 -- While you hold the Shift key, press the PageDown key once (You should see the image has moved into Layer 1, and the root layer is gone.  If it's not gone, then maybe you didn't get the rectangles deleted?)

Lock Layer 1, by clicking the tiny lock icon (it will change from looking unlocked, to looking like a closed lock).  You can do it either in the Layers dialog, or in the middle area of the status bar, across the bottom of the window.  This will prevent you from accidentally selecting the JPEG, as you work.  You can make Layer 1 partially transparent, if you find it helpful.

Make another new layer.  It can be Layer 2, or any name you want to give it.  This will be your working layer.

Those things will get you on your way.  But I'm curious what your ultimate goal is.  Because if you want the name blocks from the JPEG....  Hhmm, well first, I would look into whether the website where you copied the JPEG from will allow you to use their graphics.  But aside from that, you can't make those areas of the JPEG into links.  You have to create your own blocks that are separate from the JPEG.

You could actually use the blocks, by sort of cutting them out and putting in your rectangle.  If there are a lot of blocks, it could be tedious.  But I guess no less tedious that designing your own contents for the blocks (which Inkscape can easily do).  Well, you might already know that.  So just in case.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 09, 2017, 11:19:15 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yep, you solved your own problem!  The whole gray object, which is an imported JPEG was the link.  Here are some suggestions.

The reason clicking on the rectangle selected the whole JPEG is because the rectangle has no fill color.  So you have be careful about positioning the mouse over just the stroke (outline).  But I'll tell you one way you can avoid that.  There are other ways, so if this won't work, we can try others.

First, delete the 2 rectangles which you've drawn.  It's not absolutely necessary, but just to make a clean start.

 -- Select the JPEG
 -- right-click > Remove Link

Hhm, I see you have a root layer there.  To avoid confusion (and help facilitate easier selecting without catching the whole JPEG), let's get rid of the root layer:

 -- Layer menu > Add Layer (This will create Layer 1.  You can give it another name if you like.)
 -- Select the imported JPEG
 -- While you hold the Shift key, press the PageDown key once (You should see the image has moved into Layer 1, and the root layer is gone.  If it's not gone, then maybe you didn't get the rectangles deleted?)

Lock Layer 1, by clicking the tiny lock icon (it will change from looking unlocked, to looking like a closed lock).  You can do it either in the Layers dialog, or in the middle area of the status bar, across the bottom of the window.  This will prevent you from accidentally selecting the JPEG, as you work.  You can make Layer 1 partially transparent, if you find it helpful.

Make another new layer.  It can be Layer 2, or any name you want to give it.  This will be your working layer.

Those things will get you on your way.  But I'm curious what your ultimate goal is.  Because if you want the name blocks from the JPEG....  Hhmm, well first, I would look into whether the website where you copied the JPEG from will allow you to use their graphics.  But aside from that, you can't make those areas of the JPEG into links.  You have to create your own blocks that are separate from the JPEG.

You could actually use the blocks, by sort of cutting them out and putting in your rectangle.  If there are a lot of blocks, it could be tedious.  But I guess no less tedious that designing your own contents for the blocks (which Inkscape can easily do).  Well, you might already know that.  So just in case.

PS - You can tell what's selected by looking for what's called the bounding box (dashed line rectangle) around the object.  If you have the Selection tool enabled, you'll also see some 2-sided arrows around the object (called handles).  Those can be used for a lot of stuff, but I guess mostly scaling  or rotating. 

So if you didn't make the extra layer and lock the one with the JPEG, you could see whether you have the big image selected by looking to see where the bounding box and handles are.  But there are still more ways to help make selections easier, if you need.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 09, 2017, 11:37:45 AM
Reply #8

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7

   If I'm understanding the guidance correctly......

Clear out all prior work(ie. rectangles, etc.) or insert a new image
Create a new Layer
Associate the main JPG image to the new Layer
Lock it

Rectangles, blocks, etc. could then be placed atop it and links added to URLs

Correct?

fyi......the main  JPG is a download from my own account from ancestry.com   

 


  • .92
  • Windows 7

October 09, 2017, 11:50:17 AM
Reply #9

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7

   Okay....my understanding was incorrect. 8 )  Just tested and after locking the main JPG, a new layer had to be created on top in order to create rectangles.  When right-clicking over the rectangle, there is a very small number of options available. None of which are Create Link.

I'll have to re-read the guidance you provided over and over. It takes a bit for me to conceptualize things sometimes. lol

Once I do and tests are successful, I will let you know.

Thank you very much!
  • .92
  • Windows 7

October 09, 2017, 12:19:35 PM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Even though you're downloading the family tree from your own account, it uses graphics from that site (the font, the overall style of the box, maybe the color of the font, maybe the font itself is licensed, the little leaf, etc.).  Usually that kind of site is picky about using its graphics, but not always.

I didn't give any instructions for applying new links.  I assumed removing the link from the whole image might fix that.  But I'll have another look.

Right, when the layer is locked, nothing in it can be selected.  So you have to make a new layer for your new graphics.

Technically, it is possible to lock only the JPEG, and still be able to draw on top of it, in the same layer.  But locking objects can be tricky when it comes time to unlock it -- because it can't be easily selected  ;)

You don't have to lock the object or the layer at all.  It's just an easy way to avoid selecting the JPEG.

Oh, no wonder you're having so much trouble selecting the rectangles.  They're essentially transparent!  After you draw a rectangle, and without deselecting it, open Object menu > Fill and Stroke > Stroke Paint tab.  Then click this button  :fc:  That gives the stroke a solid color.  If you want to adjust the width of the stroke (outline), go to the Stroke Style tab > Width. 

(The stroke was set for Unset before.  Sometimes newbies get into this trouble, because they are clicking the question mark button, trying to find help.  But in this dialog, the question mark is only used for a couple of advanced things.)

Or if you'd rather give them a fill color, use the Fill tab of the same dialog.  Or just click a color on the palette.

Also, be sure to left-click, to select the object, before you right-click to create the link.  It's not absolutely necessary, but when an object is hard to select, it's a little insurance that you have the right object.

No hurry, take your time  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 09, 2017, 12:30:08 PM
Reply #11

Norkuvich

  • Sr. Newbie

  • Offline
  • **

  • 7

The goal is to make the rectangle transparent. Or, at the very least, a thin border that looks like it's part of the individual's photo. I will look into this related guidance you just conveyed:

 "After you draw a rectangle, and without deselecting it, open Object menu > Fill and Stroke > Stroke Paint tab.  Then click this button  :fc:  That gives the stroke a solid color.  If you want to adjust the width of the stroke (outline), go to the Stroke Style tab > Width. "

Now that you see what I'm trying to accomplish here, I'm open to other suggestions if you you feel there is a better way to get there.
  • .92
  • Windows 7

October 09, 2017, 02:33:03 PM
Reply #12

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok, so if you want to make the rectangle transparent, then you do want to display the ancestry graphics?  Once again, I'll say that I would be extremely cautious about that (now that I know this is for a proprietary website).  But I can't really give advice about that - only about Inkscape.

I can think of a couple of ways to go about that.  The easiest way....I can't think of any reason why the easiest way won't work.  It might not hold up under every test you might give it, if you were testing it for using the best techniques.  But it doesn't sound like it would be tested that way.

Do you want any special "animations" or special effects so that when you click it, it looks like a button has been depressed, or depressed and popped back up, or anything like that?  That would take a LOT more work, especially for a new user.  Actually I'd have to learn how to do it myself, before I could tell you.  I have a general idea about it, but never actually tried it.

So as long there's nothing fancy needed, here's what I would suggest:
  • Draw the rectangle.
  • I would type my own text and give it custom colors.  But skip if you must :)
  • Click the white palette chip.
  • Object menu > Fill and Stroke > Fill tab > A: bar  (this is the alpha channel which controls transparency) Slide it or use the spinbox and set it for 1 (one) which is almost all the way to the left.  (This will make the rectangle easily selectable, but not visible unless someone is looking for it.)  You wouldn't necessarily even need the locked layer, although it will still make it easier to avoid annoying mistakes in selection.
  • Adjust the width and height of the rectangle, using the side arrow handles (it's harder to do if you use the corner arrows)
  • If it has a stroke, you can now remove it.  (Sorry, I wasn't sure where we were going earlier.)  Fill and Stroke > Stroke Paint tab > big X button removes the stroke.
  • Duplicate that rectangle (on the command bar, which is just above the control bar, this button :dup: )
  • Move it into place.
  • Repeat 7 and 8 until finished.
  • Apply the links.

From there, you're on your own getting it uploaded or embedded into your website.  Note that if you do decide to use your own text, don't use Flowed Text (or else convert the text to path, before it goes up on the website).  (Flowed Text doesn't work on the internet.) (Can provide more info if needed.)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 09, 2017, 06:43:25 PM
Reply #13

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
See PM for updated suggestions.

(I found out via PM that the rectangles will have their own text, so  I revised my suggestion via PM.)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann