all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [html-export question] location with JS.
Date: Wed, 17 Dec 2014 14:11:22 +0100	[thread overview]
Message-ID: <m2r3vy775x.fsf@christianmoe.com> (raw)
In-Reply-To: <87y4q6v809.fsf@gmx.us>


It still works fine for me in Firefox with the added title and text,
zooming in and out (except when the window becomes seriously too small,
and the year jumps up on top of the other one, but that, I think, has to
be expected).

A different problem is that the script only picks out every other
bol-year DIV, as you will soon see if you add more entries with boxes on
the left. The reason is that getElementsByClassName returns a live
HTMLCollection that updates according to the document order of the
elements even as the script changes that order. To loop through them,
try simply

var e = elements[0]; // instead of var e = elements[i];

Yours,
Christian

Rasmus writes:

> Hi Christian,
>
> Christian Moe <mail@christianmoe.com> writes:
>
>>> The issue is
>>> that the javascript that I use absolute position in pixels, and the
>>> browser doesn't update the location when zooming...
>>>
>>> Any ideas on how to solve this?
>>
>> Which browser? It seems to work well with zooming in Firefox and Safari,
>> so I'd say you're doing something right and the browser's doing
>> something wrong.
>
> For a moment I hoped it was just a bug in the larger stylesheet(!).
> Unfortunately, I think the nice behavior you saw was 'cause my example was
> too minimal...  Try the attached file which has a title.  I definitely see
> it here, zooming in and out, especially when the window ain't to large...
>
> BTW: I tested using Firefox and Gnome Web.
>
>> (As you can guess from my attitude, though, I'm not a professional web
>> developer.)
>
> As you can /see/, me neither...
>
> Thanks,
> Rasmus

  reply	other threads:[~2014-12-17 13:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 17:37 [html-export question] location with JS Rasmus
2014-12-17  9:27 ` Christian Moe
2014-12-17 11:19   ` Rasmus
2014-12-17 13:11     ` Christian Moe [this message]
2014-12-17 15:01       ` Rasmus
2014-12-17 10:29 ` Paul Rudin
2014-12-17 11:38   ` Rasmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r3vy775x.fsf@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.