visjs-rails 4.16.1.0 → 4.21.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +19 -19
- data/example/.gitignore +26 -0
- data/example/.ruby-version +1 -0
- data/example/Gemfile +64 -0
- data/example/Gemfile.lock +224 -0
- data/example/README.md +24 -0
- data/example/Rakefile +6 -0
- data/example/app/assets/config/manifest.js +3 -0
- data/example/app/assets/images/.keep +0 -0
- data/example/app/assets/javascripts/application.js +20 -0
- data/example/app/assets/javascripts/cable.js +13 -0
- data/example/app/assets/javascripts/channels/.keep +0 -0
- data/example/app/assets/javascripts/welcome.coffee +6 -0
- data/example/app/assets/stylesheets/application.scss +3 -0
- data/example/app/assets/stylesheets/welcome.scss +3 -0
- data/example/app/channels/application_cable/channel.rb +4 -0
- data/example/app/channels/application_cable/connection.rb +4 -0
- data/example/app/controllers/application_controller.rb +2 -0
- data/example/app/controllers/concerns/.keep +0 -0
- data/example/app/controllers/welcome_controller.rb +4 -0
- data/example/app/helpers/application_helper.rb +2 -0
- data/example/app/helpers/welcome_helper.rb +2 -0
- data/example/app/jobs/application_job.rb +2 -0
- data/example/app/mailers/application_mailer.rb +4 -0
- data/example/app/models/application_record.rb +3 -0
- data/example/app/models/concerns/.keep +0 -0
- data/example/app/views/layouts/application.html.erb +15 -0
- data/example/app/views/layouts/mailer.html.erb +13 -0
- data/example/app/views/layouts/mailer.text.erb +1 -0
- data/example/app/views/welcome/index.html.erb +48 -0
- data/example/bin/bundle +3 -0
- data/example/bin/rails +9 -0
- data/example/bin/rake +9 -0
- data/example/bin/setup +36 -0
- data/example/bin/spring +17 -0
- data/example/bin/update +31 -0
- data/example/bin/yarn +11 -0
- data/example/config.ru +5 -0
- data/example/config/application.rb +19 -0
- data/example/config/boot.rb +4 -0
- data/example/config/cable.yml +10 -0
- data/example/config/credentials.yml.enc +1 -0
- data/example/config/database.yml +85 -0
- data/example/config/environment.rb +5 -0
- data/example/config/environments/development.rb +61 -0
- data/example/config/environments/production.rb +94 -0
- data/example/config/environments/test.rb +46 -0
- data/example/config/initializers/application_controller_renderer.rb +8 -0
- data/example/config/initializers/assets.rb +14 -0
- data/example/config/initializers/backtrace_silencers.rb +7 -0
- data/example/config/initializers/content_security_policy.rb +25 -0
- data/example/config/initializers/cookies_serializer.rb +5 -0
- data/example/config/initializers/filter_parameter_logging.rb +4 -0
- data/example/config/initializers/inflections.rb +16 -0
- data/example/config/initializers/mime_types.rb +4 -0
- data/example/config/initializers/wrap_parameters.rb +14 -0
- data/example/config/locales/en.yml +33 -0
- data/example/config/puma.rb +34 -0
- data/example/config/routes.rb +5 -0
- data/example/config/spring.rb +6 -0
- data/example/config/storage.yml +34 -0
- data/example/db/seeds.rb +7 -0
- data/example/lib/assets/.keep +0 -0
- data/example/lib/tasks/.keep +0 -0
- data/example/log/.keep +0 -0
- data/example/package.json +5 -0
- data/example/public/404.html +67 -0
- data/example/public/422.html +67 -0
- data/example/public/500.html +66 -0
- data/example/public/apple-touch-icon-precomposed.png +0 -0
- data/example/public/apple-touch-icon.png +0 -0
- data/example/public/favicon.ico +0 -0
- data/example/public/robots.txt +1 -0
- data/example/test/application_system_test_case.rb +5 -0
- data/example/test/controllers/.keep +0 -0
- data/example/test/controllers/welcome_controller_test.rb +9 -0
- data/example/test/fixtures/.keep +0 -0
- data/example/test/fixtures/files/.keep +0 -0
- data/example/test/helpers/.keep +0 -0
- data/example/test/integration/.keep +0 -0
- data/example/test/mailers/.keep +0 -0
- data/example/test/models/.keep +0 -0
- data/example/test/system/.keep +0 -0
- data/example/test/test_helper.rb +10 -0
- data/example/tmp/.keep +0 -0
- data/example/vendor/.keep +0 -0
- data/examples_for_vis/graph2d/01_basic.html +71 -0
- data/examples_for_vis/graph2d/02_bars.html +80 -0
- data/examples_for_vis/graph2d/03_groups.html +112 -0
- data/examples_for_vis/graph2d/04_rightAxis.html +126 -0
- data/examples_for_vis/graph2d/05_bothAxis.html +228 -0
- data/examples_for_vis/graph2d/06_interpolation.html +160 -0
- data/examples_for_vis/graph2d/07_scrollingAndSorting.html +74 -0
- data/examples_for_vis/graph2d/08_performance.html +194 -0
- data/examples_for_vis/graph2d/09_external_legend.html +452 -0
- data/examples_for_vis/graph2d/10_barsSideBySide.html +75 -0
- data/examples_for_vis/graph2d/11_barsSideBySideGroups.html +181 -0
- data/examples_for_vis/graph2d/12_customRange.html +92 -0
- data/examples_for_vis/graph2d/13_localization.html +65 -0
- data/examples_for_vis/graph2d/14_toggleGroups.html +145 -0
- data/examples_for_vis/graph2d/15_streaming_data.html +122 -0
- data/examples_for_vis/graph2d/16_bothAxisTitles.html +201 -0
- data/examples_for_vis/graph2d/17_dynamicStyling.html +281 -0
- data/examples_for_vis/graph2d/18_scatterplot.html +63 -0
- data/examples_for_vis/graph2d/19_labels.html +213 -0
- data/examples_for_vis/graph2d/20_shading.html +218 -0
- data/examples_for_vis/graph2d/21_barsWithEnd.html +76 -0
- data/examples_for_vis/graph2d/default.css +87 -0
- data/examples_for_vis/graph3d/01_basics.html +71 -0
- data/examples_for_vis/graph3d/02_camera.html +110 -0
- data/examples_for_vis/graph3d/03_filter_data.html +64 -0
- data/examples_for_vis/graph3d/04_animation.html +70 -0
- data/examples_for_vis/graph3d/05_line.html +60 -0
- data/examples_for_vis/graph3d/06_moving_dots.html +78 -0
- data/examples_for_vis/graph3d/07_dot_cloud_colors.html +72 -0
- data/examples_for_vis/graph3d/08_dot_cloud_size.html +69 -0
- data/examples_for_vis/graph3d/09_mobile.html +79 -0
- data/examples_for_vis/graph3d/10_styling.html +121 -0
- data/examples_for_vis/graph3d/11_tooltips.html +132 -0
- data/examples_for_vis/graph3d/12_custom_labels.html +116 -0
- data/examples_for_vis/graph3d/default.css +87 -0
- data/examples_for_vis/graph3d/playground/csv2array.js +120 -0
- data/examples_for_vis/graph3d/playground/csv2datatable.html +80 -0
- data/examples_for_vis/graph3d/playground/datasource.html +173 -0
- data/examples_for_vis/graph3d/playground/datasource.php +155 -0
- data/examples_for_vis/graph3d/playground/index.html +196 -0
- data/examples_for_vis/graph3d/playground/playground.css +91 -0
- data/examples_for_vis/graph3d/playground/playground.js +550 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-apollo.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-css.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-hs.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-lisp.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-lua.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-ml.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-proto.js +1 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-scala.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-sql.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-vb.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-vhdl.js +3 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-wiki.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-yaml.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/prettify.css +1 -0
- data/examples_for_vis/graph3d/playground/prettify/prettify.js +33 -0
- data/examples_for_vis/network/basicUsage.html +87 -0
- data/examples_for_vis/network/data/datasets.html +196 -0
- data/examples_for_vis/network/data/dotLanguage/data/cellular_automata.gv.txt +23 -0
- data/examples_for_vis/network/data/dotLanguage/data/computer_network.gv.txt +19 -0
- data/examples_for_vis/network/data/dotLanguage/data/simple.gv.txt +15 -0
- data/examples_for_vis/network/data/dotLanguage/dotEdgeStyles.html +197 -0
- data/examples_for_vis/network/data/dotLanguage/dotLanguage.html +22 -0
- data/examples_for_vis/network/data/dotLanguage/dotPlayground.html +216 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/fsm.gv.txt +20 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/hello.gv.txt +1 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/process.gv.txt +15 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/fsm.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/hello.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/softmaint.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/traffic_lights.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/siblings.gv.txt +512 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/softmaint.gv.txt +377 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/traffic_lights.gv.txt +29 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/transparency.gv.txt +105 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/twopi2.gv.txt +2212 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/unix.gv.txt +55 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/world.gv.txt +67 -0
- data/examples_for_vis/network/data/dynamicData.html +266 -0
- data/examples_for_vis/network/data/importingFromGephi.html +174 -0
- data/examples_for_vis/network/data/scalingCustom.html +86 -0
- data/examples_for_vis/network/data/scalingNodesEdges.html +79 -0
- data/examples_for_vis/network/data/scalingNodesEdgesLabels.html +85 -0
- data/examples_for_vis/network/datasources/WorldCup2014.js +9970 -0
- data/examples_for_vis/network/datasources/WorldCup2014.json +1 -0
- data/examples_for_vis/network/datasources/largeHierarchicalDataset.js +2 -0
- data/examples_for_vis/network/edgeStyles/arrowTypes.html +103 -0
- data/examples_for_vis/network/edgeStyles/arrows.html +61 -0
- data/examples_for_vis/network/edgeStyles/colors.html +71 -0
- data/examples_for_vis/network/edgeStyles/dashes.html +57 -0
- data/examples_for_vis/network/edgeStyles/smooth.html +78 -0
- data/examples_for_vis/network/edgeStyles/smoothWorldCup.html +97 -0
- data/examples_for_vis/network/events/interactionEvents.html +132 -0
- data/examples_for_vis/network/events/physicsEvents.html +73 -0
- data/examples_for_vis/network/events/renderEvents.html +83 -0
- data/examples_for_vis/network/exampleApplications/disassemblerExample.html +24 -0
- data/examples_for_vis/network/exampleApplications/disassemblerExample.js +53 -0
- data/examples_for_vis/network/exampleApplications/lesMiserables.html +396 -0
- data/examples_for_vis/network/exampleApplications/loadingBar.html +504 -0
- data/examples_for_vis/network/exampleApplications/neighbourhoodHighlight.html +162 -0
- data/examples_for_vis/network/exampleApplications/nodeLegend.html +163 -0
- data/examples_for_vis/network/exampleApplications/worldCupPerformance.html +98 -0
- data/examples_for_vis/network/exampleUtil.js +133 -0
- data/examples_for_vis/network/imageSelected/broken-image.png +0 -0
- data/examples_for_vis/network/imageSelected/imageSelected.html +82 -0
- data/examples_for_vis/network/imageSelected/selected.svg +53 -0
- data/examples_for_vis/network/imageSelected/unselected.svg +6 -0
- data/examples_for_vis/network/img/indonesia/1.png +0 -0
- data/examples_for_vis/network/img/indonesia/10.png +0 -0
- data/examples_for_vis/network/img/indonesia/11.png +0 -0
- data/examples_for_vis/network/img/indonesia/12.png +0 -0
- data/examples_for_vis/network/img/indonesia/13.png +0 -0
- data/examples_for_vis/network/img/indonesia/14.png +0 -0
- data/examples_for_vis/network/img/indonesia/2.png +0 -0
- data/examples_for_vis/network/img/indonesia/3.png +0 -0
- data/examples_for_vis/network/img/indonesia/4.png +0 -0
- data/examples_for_vis/network/img/indonesia/5.png +0 -0
- data/examples_for_vis/network/img/indonesia/6.png +0 -0
- data/examples_for_vis/network/img/indonesia/7.png +0 -0
- data/examples_for_vis/network/img/indonesia/8.png +0 -0
- data/examples_for_vis/network/img/indonesia/9.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Fax-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Laptop-1-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Mobile-Phone-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-Computer-3-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-PDA-02-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-PDA-04-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-PDA-05-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-Phone-Picture-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Printer-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Misc-Scanner-default-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Network-Drive-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Network-Internet-Connection-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Network-Pipe-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/System-Firewall-2-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/System-Globe-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/license.txt +14 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Document-icon24.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Document-icon32.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Document-icon48.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Email-icon24.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Email-icon32.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Email-icon48.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon24.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon32.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon48.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon64.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Smiley-Angry-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Smiley-Grin-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Administrator-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Administrator-Green-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Coat-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Coat-Green-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Coat-Red-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Executive-Green-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Preppy-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Preppy-Red-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/license.txt +12 -0
- data/examples_for_vis/network/labels/labelAlignment.html +70 -0
- data/examples_for_vis/network/labels/labelBackground.html +57 -0
- data/examples_for_vis/network/labels/labelColorAndSize.html +61 -0
- data/examples_for_vis/network/labels/labelMargins.html +63 -0
- data/examples_for_vis/network/labels/labelMultifont.html +115 -0
- data/examples_for_vis/network/labels/labelStroke.html +61 -0
- data/examples_for_vis/network/labels/multilineText.html +52 -0
- data/examples_for_vis/network/layout/demo.jsonp +1894 -0
- data/examples_for_vis/network/layout/demo_big.jsonp +3762 -0
- data/examples_for_vis/network/layout/hierarchicalLayout.html +114 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutBigUserDefined.html +46 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutMethods.html +108 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutUserdefined.html +152 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutWithoutPhysics.html +111 -0
- data/examples_for_vis/network/layout/randomSeed.html +60 -0
- data/examples_for_vis/network/nodeStyles/HTMLInNodes.html +83 -0
- data/examples_for_vis/network/nodeStyles/circularImages.html +219 -0
- data/examples_for_vis/network/nodeStyles/colors.html +140 -0
- data/examples_for_vis/network/nodeStyles/customGroups.html +132 -0
- data/examples_for_vis/network/nodeStyles/groups.html +119 -0
- data/examples_for_vis/network/nodeStyles/icons.html +196 -0
- data/examples_for_vis/network/nodeStyles/images.html +82 -0
- data/examples_for_vis/network/nodeStyles/imagesWithBorders.html +105 -0
- data/examples_for_vis/network/nodeStyles/shadows.html +119 -0
- data/examples_for_vis/network/nodeStyles/shapes.html +73 -0
- data/examples_for_vis/network/nodeStyles/shapesWithDashedBorders.html +61 -0
- data/examples_for_vis/network/nodeStyles/widthHeight.html +121 -0
- data/examples_for_vis/network/other/animationShowcase.html +279 -0
- data/examples_for_vis/network/other/changingClusteredEdgesNodes.html +107 -0
- data/examples_for_vis/network/other/chosen.html +466 -0
- data/examples_for_vis/network/other/clustering.html +141 -0
- data/examples_for_vis/network/other/clusteringByZoom.html +160 -0
- data/examples_for_vis/network/other/clustersOfclusters.html +88 -0
- data/examples_for_vis/network/other/configuration.html +83 -0
- data/examples_for_vis/network/other/cursorChange.html +140 -0
- data/examples_for_vis/network/other/manipulation.html +193 -0
- data/examples_for_vis/network/other/manipulationEditEdgeNoDrag.html +255 -0
- data/examples_for_vis/network/other/navigation.html +135 -0
- data/examples_for_vis/network/other/onLoadAnimation.html +85 -0
- data/examples_for_vis/network/other/performance.html +91 -0
- data/examples_for_vis/network/other/saveAndLoad.html +202 -0
- data/examples_for_vis/network/physics/physicsConfiguration.html +85 -0
- data/examples_for_vis/timeline/basicUsage.html +45 -0
- data/examples_for_vis/timeline/dataHandling/dataSerialization.html +123 -0
- data/examples_for_vis/timeline/dataHandling/loadExternalData.html +61 -0
- data/examples_for_vis/timeline/editing/customSnappingOfItems.html +76 -0
- data/examples_for_vis/timeline/editing/editingItems.html +109 -0
- data/examples_for_vis/timeline/editing/editingItemsCallbacks.html +172 -0
- data/examples_for_vis/timeline/editing/individualEditableItems.html +131 -0
- data/examples_for_vis/timeline/editing/itemsAlwaysDraggable.html +44 -0
- data/examples_for_vis/timeline/editing/overrideEditingItems.html +166 -0
- data/examples_for_vis/timeline/editing/tooltipOnItemChange.html +133 -0
- data/examples_for_vis/timeline/editing/updateDataOnEvent.html +87 -0
- data/examples_for_vis/timeline/groups/groups.html +79 -0
- data/examples_for_vis/timeline/groups/groupsEditable.html +2001 -0
- data/examples_for_vis/timeline/groups/groupsOrdering.html +117 -0
- data/examples_for_vis/timeline/groups/nestedGroups.html +113 -0
- data/examples_for_vis/timeline/groups/subgroups.html +326 -0
- data/examples_for_vis/timeline/groups/verticalItemsHide.html +196 -0
- data/examples_for_vis/timeline/interaction/animateWindow.html +143 -0
- data/examples_for_vis/timeline/interaction/clickToUse.html +107 -0
- data/examples_for_vis/timeline/interaction/eventListeners.html +166 -0
- data/examples_for_vis/timeline/interaction/limitMoveAndZoom.html +70 -0
- data/examples_for_vis/timeline/interaction/navigationMenu.html +121 -0
- data/examples_for_vis/timeline/interaction/rollingMode.html +50 -0
- data/examples_for_vis/timeline/interaction/setSelection.html +223 -0
- data/examples_for_vis/timeline/items/backgroundAreas.html +92 -0
- data/examples_for_vis/timeline/items/backgroundAreasWithGroups.html +123 -0
- data/examples_for_vis/timeline/items/expectedVsActualTimesItems.html +136 -0
- data/examples_for_vis/timeline/items/htmlContents.html +109 -0
- data/examples_for_vis/timeline/items/itemOrdering.html +88 -0
- data/examples_for_vis/timeline/items/pointItems.html +124 -0
- data/examples_for_vis/timeline/items/rangeOverflowItem.html +88 -0
- data/examples_for_vis/timeline/items/tooltip.html +120 -0
- data/examples_for_vis/timeline/items/visibleFrameTemplateContent.html +67 -0
- data/examples_for_vis/timeline/other/customTimeBars.html +99 -0
- data/examples_for_vis/timeline/other/customTimeBarsTooltip.html +105 -0
- data/examples_for_vis/timeline/other/dataAttributes.html +79 -0
- data/examples_for_vis/timeline/other/dataAttributesAll.html +78 -0
- data/examples_for_vis/timeline/other/drag&drop.html +201 -0
- data/examples_for_vis/timeline/other/functionLabelFormats.html +147 -0
- data/examples_for_vis/timeline/other/groupsPerformance.html +124 -0
- data/examples_for_vis/timeline/other/hidingPeriods.html +92 -0
- data/examples_for_vis/timeline/other/horizontalScroll.html +77 -0
- data/examples_for_vis/timeline/other/localization.html +81 -0
- data/examples_for_vis/timeline/other/performance.html +79 -0
- data/examples_for_vis/timeline/other/requirejs/requirejs_example.html +17 -0
- data/examples_for_vis/timeline/other/requirejs/scripts/main.js +19 -0
- data/examples_for_vis/timeline/other/requirejs/scripts/require.js +35 -0
- data/examples_for_vis/timeline/other/rtl.html +82 -0
- data/examples_for_vis/timeline/other/stressPerformance.html +66 -0
- data/examples_for_vis/timeline/other/timezone.html +98 -0
- data/examples_for_vis/timeline/other/usingReact.html +68 -0
- data/examples_for_vis/timeline/other/verticalScroll.html +91 -0
- data/examples_for_vis/timeline/resources/data/basic.json +34 -0
- data/examples_for_vis/timeline/resources/data/wk2014.json +152 -0
- data/examples_for_vis/timeline/resources/img/Hardware-Mobile-Phone-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/attachment-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/blog-post-edit-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/comments-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/community-users-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/license.txt +17 -0
- data/examples_for_vis/timeline/resources/img/license_aesthetica-2.txt +36 -0
- data/examples_for_vis/timeline/resources/img/license_refresh-cl.txt +26 -0
- data/examples_for_vis/timeline/resources/img/mail-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/notes-edit-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/product-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/truck-icon.png +0 -0
- data/examples_for_vis/timeline/styling/axisOrientation.html +113 -0
- data/examples_for_vis/timeline/styling/customCss.html +128 -0
- data/examples_for_vis/timeline/styling/gridStyling.html +80 -0
- data/examples_for_vis/timeline/styling/itemClassNames.html +125 -0
- data/examples_for_vis/timeline/styling/itemTemplates.html +264 -0
- data/examples_for_vis/timeline/styling/weekStyling.html +129 -0
- data/lib/visjs/rails/version.rb +1 -1
- data/vendor/assets/images/network/acceptDeleteIcon.png +0 -0
- data/vendor/assets/images/network/addNodeIcon.png +0 -0
- data/vendor/assets/images/network/backIcon.png +0 -0
- data/vendor/assets/images/network/connectIcon.png +0 -0
- data/vendor/assets/images/network/cross.png +0 -0
- data/vendor/assets/images/network/cross2.png +0 -0
- data/vendor/assets/images/network/deleteIcon.png +0 -0
- data/vendor/assets/images/network/downArrow.png +0 -0
- data/vendor/assets/images/network/editIcon.png +0 -0
- data/vendor/assets/images/network/leftArrow.png +0 -0
- data/vendor/assets/images/network/minus.png +0 -0
- data/vendor/assets/images/network/plus.png +0 -0
- data/vendor/assets/images/network/rightArrow.png +0 -0
- data/vendor/assets/images/network/upArrow.png +0 -0
- data/vendor/assets/images/network/zoomExtends.png +0 -0
- data/vendor/assets/javascripts/vis-graph3d.min.js +9 -12
- data/vendor/assets/javascripts/vis-network.min.js +9 -20
- data/vendor/assets/javascripts/vis-timeline-graph2d.min.js +9 -18
- data/vendor/assets/javascripts/vis.js +53293 -39579
- data/vendor/assets/javascripts/vis.min.js +26 -23
- data/vendor/assets/stylesheets/vis-network.min.css +1 -0
- data/vendor/assets/stylesheets/vis-timeline-graph2d.min.css +1 -0
- data/vendor/assets/stylesheets/{vis.scss → vis.css} +764 -640
- data/vendor/assets/stylesheets/vis.min.css +1 -0
- metadata +365 -6
- data/vendor/assets/images/timeline/delete.png +0 -0
- data/vendor/assets/stylesheets/vis.min.scss +0 -1
@@ -0,0 +1,196 @@
|
|
1
|
+
<html>
|
2
|
+
|
3
|
+
<head>
|
4
|
+
<title>Timeline | A lot of grouped data</title>
|
5
|
+
|
6
|
+
<script src="../../../docs/js/jquery.min.js"></script>
|
7
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
8
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
9
|
+
|
10
|
+
<style type="text/css">
|
11
|
+
body {
|
12
|
+
color: #4D4D4D;
|
13
|
+
font: 10pt arial;
|
14
|
+
}
|
15
|
+
</style>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body onresize="/*timeline.checkResize();*/">
|
20
|
+
<h1>Timeline vertical visibility</h1>
|
21
|
+
|
22
|
+
|
23
|
+
<button onclick="showVisibleItems()">Show current visible items</button>
|
24
|
+
<div>
|
25
|
+
<h2>visible items:</h2>
|
26
|
+
<h3 id="visibleItemsContainer"></h3>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div id="mytimeline"></div>
|
30
|
+
<br>
|
31
|
+
|
32
|
+
<script>
|
33
|
+
function showVisibleItems() {
|
34
|
+
var a = timeline.getVisibleItems();
|
35
|
+
console.log(a);
|
36
|
+
document.getElementById("visibleItemsContainer").innerHTML = ""
|
37
|
+
document.getElementById("visibleItemsContainer").innerHTML += a;
|
38
|
+
};
|
39
|
+
|
40
|
+
// get selected item count from url parameter
|
41
|
+
var count = 1000;
|
42
|
+
|
43
|
+
// create groups
|
44
|
+
var groups = new vis.DataSet([{
|
45
|
+
id: 1,
|
46
|
+
content: 'Truck 1'
|
47
|
+
},
|
48
|
+
{
|
49
|
+
id: 2,
|
50
|
+
content: 'Truck 2'
|
51
|
+
},
|
52
|
+
{
|
53
|
+
id: 3,
|
54
|
+
content: 'Truck 3'
|
55
|
+
},
|
56
|
+
{
|
57
|
+
id: 4,
|
58
|
+
content: 'Truck 4'
|
59
|
+
},
|
60
|
+
{
|
61
|
+
id: 5,
|
62
|
+
content: 'Truck 5'
|
63
|
+
},
|
64
|
+
{
|
65
|
+
id: 6,
|
66
|
+
content: 'Truck 6'
|
67
|
+
},
|
68
|
+
{
|
69
|
+
id: 7,
|
70
|
+
content: 'Truck 7'
|
71
|
+
},
|
72
|
+
{
|
73
|
+
id: 8,
|
74
|
+
content: 'Truck 8'
|
75
|
+
},
|
76
|
+
{
|
77
|
+
id: 9,
|
78
|
+
content: 'Truck 9'
|
79
|
+
},
|
80
|
+
{
|
81
|
+
id: 10,
|
82
|
+
content: 'Truck 10'
|
83
|
+
},
|
84
|
+
{
|
85
|
+
id: 11,
|
86
|
+
content: 'Truck 11'
|
87
|
+
},
|
88
|
+
{
|
89
|
+
id: 12,
|
90
|
+
content: 'Truck 12'
|
91
|
+
},
|
92
|
+
{
|
93
|
+
id: 13,
|
94
|
+
content: 'Truck 13'
|
95
|
+
},
|
96
|
+
{
|
97
|
+
id: 14,
|
98
|
+
content: 'Truck 14'
|
99
|
+
},
|
100
|
+
{
|
101
|
+
id: 15,
|
102
|
+
content: 'Truck 15'
|
103
|
+
},
|
104
|
+
{
|
105
|
+
id: 16,
|
106
|
+
content: 'Truck 16'
|
107
|
+
},
|
108
|
+
{
|
109
|
+
id: 17,
|
110
|
+
content: 'Truck 17'
|
111
|
+
},
|
112
|
+
{
|
113
|
+
id: 18,
|
114
|
+
content: 'Truck 18'
|
115
|
+
},
|
116
|
+
{
|
117
|
+
id: 19,
|
118
|
+
content: 'Truck 19'
|
119
|
+
},
|
120
|
+
{
|
121
|
+
id: 20,
|
122
|
+
content: 'Truck 20'
|
123
|
+
},
|
124
|
+
{
|
125
|
+
id: 21,
|
126
|
+
content: 'Truck 21'
|
127
|
+
},
|
128
|
+
{
|
129
|
+
id: 22,
|
130
|
+
content: 'Truck 22'
|
131
|
+
},
|
132
|
+
{
|
133
|
+
id: 23,
|
134
|
+
content: 'Truck 23'
|
135
|
+
},
|
136
|
+
{
|
137
|
+
id: 24,
|
138
|
+
content: 'Truck 24'
|
139
|
+
},
|
140
|
+
{
|
141
|
+
id: 25,
|
142
|
+
content: 'Truck 25'
|
143
|
+
},
|
144
|
+
|
145
|
+
]);
|
146
|
+
|
147
|
+
// create items
|
148
|
+
var items = new vis.DataSet();
|
149
|
+
|
150
|
+
var types = ['box', 'point', 'range', 'background']
|
151
|
+
var order = 1;
|
152
|
+
var truck = 1;
|
153
|
+
for (var j = 0; j < 25; j++) {
|
154
|
+
var date = new Date();
|
155
|
+
for (var i = 0; i < count / 25; i++) {
|
156
|
+
date.setHours(date.getHours() + 4 * (Math.random() < 0.2));
|
157
|
+
var start = new Date(date);
|
158
|
+
|
159
|
+
date.setHours(date.getHours() + 2 + Math.floor(Math.random() * 4));
|
160
|
+
var end = new Date(date);
|
161
|
+
|
162
|
+
var type = types[Math.floor(4 * Math.random())]
|
163
|
+
|
164
|
+
items.add({
|
165
|
+
id: order,
|
166
|
+
group: truck,
|
167
|
+
start: start,
|
168
|
+
end: end,
|
169
|
+
type: type,
|
170
|
+
content: 'Order ' + order
|
171
|
+
});
|
172
|
+
|
173
|
+
order++;
|
174
|
+
}
|
175
|
+
truck++;
|
176
|
+
}
|
177
|
+
|
178
|
+
// specify options
|
179
|
+
var options = {
|
180
|
+
stack: true,
|
181
|
+
maxHeight: 400,
|
182
|
+
start: new Date(),
|
183
|
+
end: new Date(1000 * 60 * 60 * 24 + (new Date()).valueOf()),
|
184
|
+
};
|
185
|
+
|
186
|
+
|
187
|
+
// create a Timeline
|
188
|
+
var container = document.getElementById('mytimeline');
|
189
|
+
timeline = new vis.Timeline(container, null, options);
|
190
|
+
timeline.setGroups(groups);
|
191
|
+
timeline.setItems(items);
|
192
|
+
</script>
|
193
|
+
|
194
|
+
</body>
|
195
|
+
|
196
|
+
</html>
|
@@ -0,0 +1,143 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Timeline | Animate window</title>
|
6
|
+
|
7
|
+
<style>
|
8
|
+
body,
|
9
|
+
html {
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
font-size: 11pt;
|
12
|
+
}
|
13
|
+
|
14
|
+
input {
|
15
|
+
margin: 2px 0;
|
16
|
+
}
|
17
|
+
</style>
|
18
|
+
|
19
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
20
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
21
|
+
|
22
|
+
</head>
|
23
|
+
|
24
|
+
<body>
|
25
|
+
|
26
|
+
<p>This example demonstrates functions to programmatically adjust the visible window of the Timeline.</p>
|
27
|
+
|
28
|
+
<p>
|
29
|
+
<input type="button" id="window1" value="Set window from 2014-01-01 to 2014-04-01">
|
30
|
+
<br>
|
31
|
+
<input type="button" id="window2" value="Set window from 2014-01-01 to 2014-04-01 without animation">
|
32
|
+
<br>
|
33
|
+
<input type="button" id="moveTo" value="Move to 2014-02-01">
|
34
|
+
<br>
|
35
|
+
<input type="button" id="fit" value="Fit all items">
|
36
|
+
<br>
|
37
|
+
<input type="button" id="select" value="Select & focus items 5 and 6">
|
38
|
+
<br>
|
39
|
+
<input type="button" id="focus1" value="Focus item 2">
|
40
|
+
<br>
|
41
|
+
<input type="button" id="focus2" value="Focus items 5 and 6 (slow and linear animation)">
|
42
|
+
<br>
|
43
|
+
<input type="button" id="focus3" value="Focus current selection">
|
44
|
+
<br>
|
45
|
+
</p>
|
46
|
+
|
47
|
+
<div id="visualization"></div>
|
48
|
+
|
49
|
+
<script>
|
50
|
+
// create a dataset with items
|
51
|
+
// we specify the type of the fields `start` and `end` here to be strings
|
52
|
+
// containing an ISO date. The fields will be outputted as ISO dates
|
53
|
+
// automatically getting data from the DataSet via items.get().
|
54
|
+
var items = new vis.DataSet({
|
55
|
+
type: {
|
56
|
+
start: 'ISODate',
|
57
|
+
end: 'ISODate'
|
58
|
+
}
|
59
|
+
});
|
60
|
+
|
61
|
+
// add items to the DataSet
|
62
|
+
items.add([{
|
63
|
+
id: 1,
|
64
|
+
content: 'item 1<br>start',
|
65
|
+
start: '2014-01-23'
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: 2,
|
69
|
+
content: 'item 2',
|
70
|
+
start: '2014-01-18'
|
71
|
+
},
|
72
|
+
{
|
73
|
+
id: 3,
|
74
|
+
content: 'item 3',
|
75
|
+
start: '2014-01-21'
|
76
|
+
},
|
77
|
+
{
|
78
|
+
id: 4,
|
79
|
+
content: 'item 4',
|
80
|
+
start: '2014-01-19',
|
81
|
+
end: '2014-01-24'
|
82
|
+
},
|
83
|
+
{
|
84
|
+
id: 5,
|
85
|
+
content: 'item 5',
|
86
|
+
start: '2014-01-28',
|
87
|
+
type: 'point'
|
88
|
+
},
|
89
|
+
{
|
90
|
+
id: 6,
|
91
|
+
content: 'item 6',
|
92
|
+
start: '2014-01-26'
|
93
|
+
}
|
94
|
+
]);
|
95
|
+
|
96
|
+
var container = document.getElementById('visualization');
|
97
|
+
var options = {
|
98
|
+
start: '2014-01-10',
|
99
|
+
end: '2014-02-10',
|
100
|
+
editable: true,
|
101
|
+
showCurrentTime: true
|
102
|
+
};
|
103
|
+
|
104
|
+
var timeline = new vis.Timeline(container, items, options);
|
105
|
+
|
106
|
+
document.getElementById('window1').onclick = function () {
|
107
|
+
timeline.setWindow('2014-01-01', '2014-04-01');
|
108
|
+
};
|
109
|
+
document.getElementById('window2').onclick = function () {
|
110
|
+
timeline.setWindow('2014-01-01', '2014-04-01', {
|
111
|
+
animation: false
|
112
|
+
});
|
113
|
+
};
|
114
|
+
document.getElementById('fit').onclick = function () {
|
115
|
+
timeline.fit();
|
116
|
+
};
|
117
|
+
document.getElementById('select').onclick = function () {
|
118
|
+
timeline.setSelection([5, 6], {
|
119
|
+
focus: true
|
120
|
+
});
|
121
|
+
};
|
122
|
+
document.getElementById('focus1').onclick = function () {
|
123
|
+
timeline.focus(2);
|
124
|
+
};
|
125
|
+
document.getElementById('focus2').onclick = function () {
|
126
|
+
timeline.focus([5, 6], {
|
127
|
+
animation: {
|
128
|
+
duration: 3000,
|
129
|
+
easingFunction: 'linear'
|
130
|
+
}
|
131
|
+
}); // ms
|
132
|
+
};
|
133
|
+
document.getElementById('focus3').onclick = function () {
|
134
|
+
var selection = timeline.getSelection();
|
135
|
+
timeline.focus(selection);
|
136
|
+
};
|
137
|
+
document.getElementById('moveTo').onclick = function () {
|
138
|
+
timeline.moveTo('2014-02-01');
|
139
|
+
};
|
140
|
+
</script>
|
141
|
+
</body>
|
142
|
+
|
143
|
+
</html>
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Timeline | Click to use</title>
|
6
|
+
|
7
|
+
<style>
|
8
|
+
body,
|
9
|
+
html {
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
font-size: 11pt;
|
12
|
+
}
|
13
|
+
|
14
|
+
#main {
|
15
|
+
width: 728px;
|
16
|
+
margin: 0 auto;
|
17
|
+
}
|
18
|
+
|
19
|
+
.container {
|
20
|
+
margin: 10px;
|
21
|
+
}
|
22
|
+
</style>
|
23
|
+
|
24
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
25
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
26
|
+
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body>
|
30
|
+
<div id="main">
|
31
|
+
<h1>Timeline click to use</h1>
|
32
|
+
<p>
|
33
|
+
This example demonstrates how to use the
|
34
|
+
<code>clickToUse</code> option: before you can scroll and drag in the timeline, you first have to click in the timeline to
|
35
|
+
activate.
|
36
|
+
</p>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<script>
|
40
|
+
// create a dataset with items
|
41
|
+
// we specify the type of the fields `start` and `end` here to be strings
|
42
|
+
// containing an ISO date. The fields will be outputted as ISO dates
|
43
|
+
// automatically getting data from the DataSet via items.get().
|
44
|
+
var items = new vis.DataSet({
|
45
|
+
type: {
|
46
|
+
start: 'ISODate',
|
47
|
+
end: 'ISODate'
|
48
|
+
}
|
49
|
+
});
|
50
|
+
|
51
|
+
// add items to the DataSet
|
52
|
+
items.add([{
|
53
|
+
id: 1,
|
54
|
+
content: 'item 1<br>start',
|
55
|
+
start: '2014-01-23'
|
56
|
+
},
|
57
|
+
{
|
58
|
+
id: 2,
|
59
|
+
content: 'item 2',
|
60
|
+
start: '2014-01-18'
|
61
|
+
},
|
62
|
+
{
|
63
|
+
id: 3,
|
64
|
+
content: 'item 3',
|
65
|
+
start: '2014-01-21'
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: 4,
|
69
|
+
content: 'item 4',
|
70
|
+
start: '2014-01-19',
|
71
|
+
end: '2014-01-24'
|
72
|
+
},
|
73
|
+
{
|
74
|
+
id: 5,
|
75
|
+
content: 'item 5',
|
76
|
+
start: '2014-01-28',
|
77
|
+
type: 'point'
|
78
|
+
},
|
79
|
+
{
|
80
|
+
id: 6,
|
81
|
+
content: 'item 6',
|
82
|
+
start: '2014-01-26'
|
83
|
+
}
|
84
|
+
]);
|
85
|
+
|
86
|
+
function createTimeline(main) {
|
87
|
+
var main = document.getElementById('main');
|
88
|
+
var container = document.createElement('div');
|
89
|
+
container.className = 'container';
|
90
|
+
main.appendChild(container);
|
91
|
+
|
92
|
+
var options = {
|
93
|
+
editable: true,
|
94
|
+
clickToUse: true
|
95
|
+
};
|
96
|
+
|
97
|
+
return new vis.Timeline(container, items, options);
|
98
|
+
}
|
99
|
+
|
100
|
+
var timelines = [];
|
101
|
+
for (var i = 0; i < 10; i++) {
|
102
|
+
timelines.push(createTimeline());
|
103
|
+
}
|
104
|
+
</script>
|
105
|
+
</body>
|
106
|
+
|
107
|
+
</html>
|
@@ -0,0 +1,166 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Timeline | Event listeners</title>
|
6
|
+
|
7
|
+
<style type="text/css">
|
8
|
+
body,
|
9
|
+
html {
|
10
|
+
font-family: sans-serif;
|
11
|
+
}
|
12
|
+
</style>
|
13
|
+
|
14
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
15
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
16
|
+
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<p>
|
21
|
+
This example listens for events
|
22
|
+
<code>select</code>,
|
23
|
+
<code>click</code>,
|
24
|
+
<code>doubleClick</code>,
|
25
|
+
<code>rangechange</code>, and
|
26
|
+
<code>rangechanged</code> of the Timeline (other possible events:
|
27
|
+
<code>mouseDown</code>,
|
28
|
+
<code>mouseUp</code>,
|
29
|
+
<code>mouseOver</code>,
|
30
|
+
<code>mouseMove</code>), and listens for changes in the DataSet (
|
31
|
+
<code>add</code>,
|
32
|
+
<code>update</code>, or
|
33
|
+
<code>remove</code> items).
|
34
|
+
</p>
|
35
|
+
<div id="visualization"></div>
|
36
|
+
<p></p>
|
37
|
+
<div id="hoveredItem"></div>
|
38
|
+
<div id="log"></div>
|
39
|
+
|
40
|
+
<script type="text/javascript">
|
41
|
+
var items = new vis.DataSet([{
|
42
|
+
id: 1,
|
43
|
+
content: 'item 1',
|
44
|
+
start: '2013-04-20'
|
45
|
+
},
|
46
|
+
{
|
47
|
+
id: 2,
|
48
|
+
content: 'item 2',
|
49
|
+
start: '2013-04-14'
|
50
|
+
},
|
51
|
+
{
|
52
|
+
id: 3,
|
53
|
+
content: 'item 3',
|
54
|
+
start: '2013-04-18'
|
55
|
+
},
|
56
|
+
{
|
57
|
+
id: 4,
|
58
|
+
content: 'item 4',
|
59
|
+
start: '2013-04-16',
|
60
|
+
end: '2013-04-19'
|
61
|
+
},
|
62
|
+
{
|
63
|
+
id: 5,
|
64
|
+
content: 'item 5',
|
65
|
+
start: '2013-04-25'
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: 6,
|
69
|
+
content: 'item 6',
|
70
|
+
start: '2013-04-27'
|
71
|
+
}
|
72
|
+
]);
|
73
|
+
|
74
|
+
var container = document.getElementById('visualization');
|
75
|
+
var options = {
|
76
|
+
editable: true,
|
77
|
+
onInitialDrawComplete: function () {
|
78
|
+
logEvent('Timeline initial draw completed', {});
|
79
|
+
},
|
80
|
+
};
|
81
|
+
var timeline = new vis.Timeline(container, items, options);
|
82
|
+
|
83
|
+
timeline.on('rangechange', function (properties) {
|
84
|
+
logEvent('rangechange', properties);
|
85
|
+
});
|
86
|
+
|
87
|
+
timeline.on('rangechanged', function (properties) {
|
88
|
+
logEvent('rangechanged', properties);
|
89
|
+
});
|
90
|
+
|
91
|
+
timeline.on('select', function (properties) {
|
92
|
+
logEvent('select', properties);
|
93
|
+
});
|
94
|
+
|
95
|
+
timeline.on('itemover', function (properties) {
|
96
|
+
logEvent('itemover', properties);
|
97
|
+
setHoveredItem(properties.item);
|
98
|
+
});
|
99
|
+
|
100
|
+
timeline.on('itemout', function (properties) {
|
101
|
+
logEvent('itemout', properties);
|
102
|
+
setHoveredItem('none');
|
103
|
+
});
|
104
|
+
|
105
|
+
timeline.on('click', function (properties) {
|
106
|
+
logEvent('click', properties);
|
107
|
+
});
|
108
|
+
|
109
|
+
timeline.on('doubleClick', function (properties) {
|
110
|
+
logEvent('doubleClick', properties);
|
111
|
+
});
|
112
|
+
|
113
|
+
timeline.on('contextmenu', function (properties) {
|
114
|
+
logEvent('contextmenu', properties);
|
115
|
+
});
|
116
|
+
|
117
|
+
timeline.on('mouseDown', function (properties) {
|
118
|
+
logEvent('mouseDown', properties);
|
119
|
+
});
|
120
|
+
|
121
|
+
timeline.on('mouseUp', function (properties) {
|
122
|
+
logEvent('mouseUp', properties);
|
123
|
+
});
|
124
|
+
|
125
|
+
// other possible events:
|
126
|
+
|
127
|
+
// timeline.on('mouseOver', function (properties) {
|
128
|
+
// logEvent('mouseOver', properties);
|
129
|
+
// });
|
130
|
+
|
131
|
+
// timeline.on("mouseMove", function(properties) {
|
132
|
+
// logEvent('mouseMove', properties);
|
133
|
+
// });
|
134
|
+
|
135
|
+
items.on('*', function (event, properties) {
|
136
|
+
logEvent(event, properties);
|
137
|
+
});
|
138
|
+
|
139
|
+
function stringifyObject(object) {
|
140
|
+
if (!object) return;
|
141
|
+
var replacer = function (key, value) {
|
142
|
+
if (value && value.tagName) {
|
143
|
+
return "DOM Element";
|
144
|
+
} else {
|
145
|
+
return value;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
return JSON.stringify(object, replacer)
|
149
|
+
}
|
150
|
+
|
151
|
+
function logEvent(event, properties) {
|
152
|
+
var log = document.getElementById('log');
|
153
|
+
var msg = document.createElement('div');
|
154
|
+
msg.innerHTML = 'event=' + JSON.stringify(event) + ', ' +
|
155
|
+
'properties=' + stringifyObject(properties);
|
156
|
+
log.firstChild ? log.insertBefore(msg, log.firstChild) : log.appendChild(msg);
|
157
|
+
}
|
158
|
+
|
159
|
+
function setHoveredItem(id) {
|
160
|
+
var hoveredItem = document.getElementById('hoveredItem');
|
161
|
+
hoveredItem.innerHTML = 'hoveredItem=' + id;
|
162
|
+
}
|
163
|
+
</script>
|
164
|
+
</body>
|
165
|
+
|
166
|
+
</html>
|