satorupan / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE: Ability to remove events from the Timeline #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Timeline doesn't allow you to remove specific events from the TL, but
rather only filter or remove all (aka clear).  It seems straightforward
enough, so I extended via prototype, but this seems to remove from only the
main band.  The other 2 bands (which are syncing) and include only tick
marks don't seem to repaint themselves.  The doc says that clients should
not explicitly call repaint.

Timeline.DefaultEventSource.prototype.remove = function(id) {
    this._events.remove(id);
};
SimileAjax.EventIndex.prototype.remove = function(id) {
    var evt = this._idToEvent[id];
    this._events.remove(evt);
    delete this._idToEvent[id];
};

Thanks.

Original issue reported on code.google.com by jjb...@gmail.com on 3 Jul 2008 at 10:38

GoogleCodeExporter commented 9 years ago
this is an enhancement NOT a defect, but there was no option to select that.

Original comment by jjb...@gmail.com on 3 Jul 2008 at 10:39

GoogleCodeExporter commented 9 years ago
enhancement with partial patch

Original comment by nicolas....@logilab.fr on 14 Sep 2008 at 7:03

GoogleCodeExporter commented 9 years ago
Added Timeline prefix

Original comment by larryklu...@gmail.com on 25 Sep 2008 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by stefano.mazzocchi@gmail.com on 25 Mar 2009 at 7:01

GoogleCodeExporter commented 9 years ago
Are these things I read about adding and removing events at runtime in the 
version in
the svn ?

I'm using the downloaded zip version, but all these snippets don't seem to work.

Original comment by litobyte...@gmail.com on 25 Jun 2009 at 5:18

GoogleCodeExporter commented 9 years ago
@litobyte -- the code snippet in this issue report is a proposal for an 
enhancement
to Timeline. As of v2.3, you can not remove events. But you can filter events 
so that
they will not show on the Timeline. See the filtering function. 

Original comment by larryklu...@gmail.com on 25 Jun 2009 at 5:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@litobyte -- Pls don't use this bug tracker as a forum. If you have questions 
about
the sw, please use the mailing list. Thanks.

Original comment by larryklu...@gmail.com on 28 Jun 2009 at 7:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi All !

I'll vote for this request! I have something about 500-2000 events in memory 
and each
time I recieve a update, I'll remove the oldest [for performance/memory 
reasons].
Together with this enhancement I see the following:
- getNewestEvent, together with delete - or - deleteNewestEvent
- getOldestEvent, together with delete - or - deleteOldestEvent
Even if there would be the possibility to remove an event, you must find it! 
Having a
huge number of events, an enumeration operation would be too timeconsuming. So
deleting the oldest would be the best for me [but other may have other needs!].

Thanks a lot!

br--mabra

Original comment by mabr...@gmail.com on 18 Sep 2009 at 3:52

GoogleCodeExporter commented 9 years ago
You should call tl.layout() after deleting an event and the timeline will be 
updated.

Original comment by leitao.o...@gmail.com on 10 Nov 2010 at 4:00