senchalabs / jsduck

Simple JavaScript Duckumentation generator.
http://docs.sencha.com/
GNU General Public License v3.0
1.5k stars 238 forks source link

Clear examples container after navigating away from example #537

Open shteou opened 10 years ago

shteou commented 10 years ago

From what I can see, the current behaviour for guides/videos/examples etc. is that they are loaded into a container specific to the type of item (so there is one guide container, one video container, one example container).

As a result of this, if I perform the following actions:

The example is still running within the examples container.

Similarly, if I:

The example will continue to run in the background.

We use examples to show off various video elements in our application, meaning playback is not stopped if you change from an example to another tab type or simply close the example.

Is there any way to avoid this behaviour without changing JSDuck itself? If not, I guess this is a feature/enhancement request. I have made my own changes to JSDuck, but have zero experience of ExtJS, nor have I made it configurable or any of that good stuff.

Kind regards, Stew.

nene commented 10 years ago

Hi, sorry for the late reply.

Yes, the only way to change this behavior is to modify JSDuck. You are correct that this is just an accident of implementation.

I think the case that the example still remains playing when you explicitly close a tab, is something that should be fixed.

The fact that the example remains running when you open a guide or something else, is a different issue. Actually I've been thinking that for performance reasons it might be better to keep the content active for all the currently open tabs.

You could share the changes you have made, and if they're good enough, I might pull them in.