From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: [html-export question] location with JS. Date: Wed, 17 Dec 2014 14:11:22 +0100 Message-ID: References: <87wq5rwl5n.fsf@gmx.us> <87y4q6v809.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1EN8-00049v-Bl for emacs-orgmode@gnu.org; Wed, 17 Dec 2014 08:10:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1EN2-0001Wh-2R for emacs-orgmode@gnu.org; Wed, 17 Dec 2014 08:10:34 -0500 Received: from mail2.b1.hitrost.net ([91.185.211.205]:37522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1EN1-0001WY-Rx for emacs-orgmode@gnu.org; Wed, 17 Dec 2014 08:10:27 -0500 In-reply-to: <87y4q6v809.fsf@gmx.us> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org 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 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