Skip to content

Instantly share code, notes, and snippets.

View rashnk's full-sized avatar

Rashid rashnk

  • Freelancer
  • Kerala
View GitHub Profile
@rashnk
rashnk / main.dart
Last active November 14, 2023 05:40
import 'package:flutter/material.dart';
/// Flutter code sample for [NavigationRail].
void main() => runApp(const NavigationRailExampleApp());
class NavigationRailExampleApp extends StatelessWidget {
const NavigationRailExampleApp({super.key});
@override
@rashnk
rashnk / README.md
Created July 2, 2018 05:03 — forked from robschmuecker/README.md
Drag and drop, collapsible d3.js Tree with 50,000 nodes

This is an example of a collapsible drag and drop tree implementing slightly modified code from https://gist.github.com/robschmuecker/7880033

This is posted in order to demonstrate a viable answer for a Stack Overflow question http://stackoverflow.com/questions/20539922/has-anyone-produced-a-virtualised-javascript-tree-for-thousands-of-nodes

The only difference between this gist and the one referenced above is that the JSON file has changed. Each node contains 15 children and the depth is 4. Hence over 50,000 nodes.

The performance is fine if not too many of the nodes are present at once in the DOM. The JSON was contructed at http://www.json-generator.com/ with the following markup