Comments (8)
@dleitee this improves the strman usability a lot (though, still not great)
https://doclets.io/dleitee/strman/v1.3.0
from doclets.
Hi, the real solution is for us to make them load faster. However, while we work on that, I have had success simply delaying the loading. If you look at this blog post I wrote, it loads many examples and still remains fast scrolling: http://tolmasky.com/2016/03/24/generalizing-jsx/ . The code is in that same file.
from doclets.
@tolmasky Thank you very much!!!! 💯 I'll try to integrate your temp solution.
from doclets.
@tolmasky ... sorry... could you please point me to the piece of code which handles the loading/delaying/whatever of the tonicdev examples? Thanks!!!
from doclets.
Sure, its just:
var samples = document.querySelectorAll(".highlighter-rouge");
var index = 0;
var count = samples.length;
function load(aSample)
{
var source = Tonic.sourceFromElement(aSample);
aSample.innerHTML = "";
Tonic.createNotebook(
{
// the parent element for the new notebook
element: aSample,
// specify the source of the notebook
source: source,
nodeVersion: "4.x.x"
});
}
function loadAll(samples, index)
{
while (index < count && samples[index].tagName !== "DIV")
++index;
if (!(index < count))
return;
load(samples[index]);
setTimeout(loadAll, 1000, samples, index + 1);
}
loadAll(samples, 0);
That will crawl down and do 1 per sec.
from doclets.
@tolmasky Thanks 💯 again! This is in now...
As long as the tonic devs don't load faster, this is probably an as-good-as-possible solution, so i'll close this for now.
from doclets.
@lipp Thank you, I will see doclets project and verify if I can contribute with improvements and fixes.
from doclets.
Another strategy is to do what lodash has done: http://lodash.github.io (show the embed/ run it when clicked)
from doclets.
Related Issues (20)
- Documentation breaks when formatting is wrong HOT 3
- add HTMLElement to built-in types/links
- Display function.name instead of module.exports HOT 1
- doclets.io not picking up changes HOT 12
- Unselected branches may get visible after server restart
- branch name with '/' not supported HOT 1
- Support for other repo source (Gitlab, pull on hooks) HOT 1
- Consider using documentation.js instead of jsdoc HOT 3
- 504 Gateway Timeout HOT 6
- Build docs for PRs
- Support for JSDoc Tutorials HOT 1
- TypeScript support
- Instance and static members with the same name are conflated
- Incorrect date on documentation header HOT 2
- nps-utils doclets not rendering HOT 2
- Manual update
- SSL Certificate Expired HOT 1
- SSL Certificate Expired
- Login-Issues, session can't be saved HOT 7
- SSL certificate exired on 12.12.2018
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doclets.