/** * CertainTrust SDK * * Implements the computational trust model "CertainTrust" * in JavaScript. * See for further details. * * * Telecooperation Department, Technische Universität Darmstadt * * * Prof. Dr. Max Mühlhäuser * Florian Volk * * * @author David Kalnischkies * @author Florian Volk * @version 1.0 */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** Certain Trust Widget * * Creates a color-coded graph created from an initial trust value * in which the user can pick certainty (y-axis) and trust (x-axis) * with the mouse in the graph. * * The values are displayed and can be modified inside a form * while the graph in the canvas will be updated from those values. * * Options can be given in an object as parameter to the constructor * The following keys are understood: * id is the id the top-div of the widget will get. Its used as basename for all element ids in it, too * label is an object for various messages which are shown to the user * lang is the language to use. Available are 'de' and 'en' (default) * Alternatively f, t, c and e can be used to set the text explicitly * canvas is an object containing subkeys 'width' and 'height' defining dimensions of the canvas element * line is an object defining the style of the lines building the cross to mark the chosen trust/certainty * cap is the canvas.lineCap defining the style used to smooth the end of the lines * height is the length of the line from start to the crosspoint * width is the thickness of the line * style is the color of the line * readonly can be used to disable input in the HTI as a whole, * Alternatively f, t, c, e, inputs for all of the previous and mouse can be used to disable specific elements. * show can be used to disable display of certain inputs refered to as * f, t, c, e, inputs for all of the previous, title and axes. * * One of the following keys can be used to specify the position of the widget in the DOM, * the first defined will be used. If none is provided domAfter will be set to the