From eef2407a97ad10d2cc78f211ed2dfb07664f63be Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Mon, 21 Sep 2015 17:19:27 +0200 Subject: [PATCH] updated history --- HISTORY.md | 4 +++- dist/vis.js | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 0cef97d7..d54bf33a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,7 +1,7 @@ # vis.js history http://visjs.org -## NOT YET RELEASED, version 4.8.3 +## NOT YET RELEASED, version 4.9.0 ### Network @@ -9,6 +9,8 @@ http://visjs.org - Fixed bug where a box shape could not be drawn outside of the viewable area. - Fixed bug where dragging a node that is not a control node during edit edge mode would throw an error. - Made autoscaling on container size change pick the lowest between delta height and delta width. +- Added images with borders option (useBorderWithImage) +- Updated the manipulation css to fix offset if there is no seperator. ## 2015-09-14, version 4.8.2 diff --git a/dist/vis.js b/dist/vis.js index d3c240c1..3d113d30 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -14980,6 +14980,24 @@ return /******/ (function(modules) { // webpackBootstrap return customTimes[0].getCustomTime(); }; + /** + * Set a custom title for the custom time bar. + * @param {String} [title] Custom title + * @param {number} [id=undefined] Id of the custom time bar. + */ + Core.prototype.setCustomTimeTitle = function (title, id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); + } + if (customTimes.length > 0) { + return customTimes[0].setCustomTitle(title); + } + }; + /** * Retrieve meta information from an event. * Should be overridden by classes extending Core @@ -21083,7 +21101,8 @@ return /******/ (function(modules) { // webpackBootstrap moment: moment, locales: locales, locale: 'en', - id: undefined + id: undefined, + title: undefined }; this.options = util.extend({}, this.defaultOptions); @@ -21183,8 +21202,12 @@ return /******/ (function(modules) { // webpackBootstrap locale = this.options.locales['en']; // fall back on english when not available } - var title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); - title = title.charAt(0).toUpperCase() + title.substring(1); + var title = this.options.title; + // To hide the title completely use empty string ''. + if (title === undefined) { + title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); + title = title.charAt(0).toUpperCase() + title.substring(1); + } this.bar.style.left = x + 'px'; this.bar.title = title; @@ -21219,6 +21242,14 @@ return /******/ (function(modules) { // webpackBootstrap return new Date(this.customTime.valueOf()); }; + /** + * Set custom title. + * @param {Date | number | string} title + */ + CustomTime.prototype.setCustomTitle = function (title) { + this.options.title = title; + }; + /** * Start moving horizontally * @param {Event} event