All Projects → erdincuzun → obfc.js

erdincuzun / obfc.js

Licence: MIT license
Object Based Flow Charts(obfc): Draws SVG-based flow charts by creating objects in your web pages.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to obfc.js

Object Visualizer
Vue JSON inspector with Chrome-like theme.
Stars: ✭ 159 (+736.84%)
Mutual labels:  object
X2struct
Convert between json string and c++ object. json字符串和c++结构体之间互相转换
Stars: ✭ 251 (+1221.05%)
Mutual labels:  object
reach-schema
Functional schema-driven JavaScript object validation library.
Stars: ✭ 34 (+78.95%)
Mutual labels:  object
Object Oriented Programming Using Python
Python is a multi-paradigm programming language. Meaning, it supports different programming approach. One of the popular approach to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP).
Stars: ✭ 183 (+863.16%)
Mutual labels:  object
Typy
Minimal JavaScript type checking library
Stars: ✭ 215 (+1031.58%)
Mutual labels:  object
ethjs-contract
A simple contract object for the Ethereum RPC layer.
Stars: ✭ 21 (+10.53%)
Mutual labels:  object
Node Console Probe
Inspect JavaScript object methods and properties in the console.
Stars: ✭ 139 (+631.58%)
Mutual labels:  object
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: ✭ 54 (+184.21%)
Mutual labels:  object
Clone Deep
Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. Used by superstruct, merge-deep, and many others!
Stars: ✭ 229 (+1105.26%)
Mutual labels:  object
object-visit
Call the given method on each value in the given object.
Stars: ✭ 19 (+0%)
Mutual labels:  object
Get Value
Use property paths (`a.b.c`) get a nested value from an object.
Stars: ✭ 194 (+921.05%)
Mutual labels:  object
Yolo person detect
person detect based on yolov3 with several Python scripts
Stars: ✭ 212 (+1015.79%)
Mutual labels:  object
has-value
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
Stars: ✭ 27 (+42.11%)
Mutual labels:  object
Deepdash
eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
Stars: ✭ 175 (+821.05%)
Mutual labels:  object
omit-empty
Recursively omit empty properties from an object. Omits empty objects, arrays, strings, and optionally zero. Similar results to what you would expect with `compact` for arrays.
Stars: ✭ 71 (+273.68%)
Mutual labels:  object
Nope Validator
A small, simple and fast JS validator. Like, wow thats fast. 🚀
Stars: ✭ 142 (+647.37%)
Mutual labels:  object
stringify-keys
Build an array of key paths from an object.
Stars: ✭ 18 (-5.26%)
Mutual labels:  object
obman
[cvpr19] Hands+Objects synthetic dataset, instructions to download and code to load the dataset
Stars: ✭ 120 (+531.58%)
Mutual labels:  object
DTE
Generate C# class from database table
Stars: ✭ 26 (+36.84%)
Mutual labels:  object
js-deep-sort-object
Simple module to sort objects recursively by its keys
Stars: ✭ 19 (+0%)
Mutual labels:  object

obfc.js

Object Based Flow Charts(obfc): Draws SVG-based flow charts by creating objects in your web pages. obfc.js is an object-based JavaScript Library for drawing SVG flow charts acroos modern web browsers. It makes easily to construct objects, links and connections. Moreover, it dispatches a click event when an object or a line is clicked and descriptions can be added for all clicks.

More documents about obfc.js

SVG Shapes

obfc.js has 24 different SVG shapes that can be divided into four groups:

  • Operation Symbols:Process, Predefined Process, Alternate Process, Delay, Preparation, Manual Operation
  • Branching and Control of Flow Symbols:Terminal, Decision, Connector (Inspection), Off-Page Connector, OR, Summing Junction
  • Input and Output Symbols: Data, Document, Multi - Document, Display, Manual Input, Card, Punched Tape
  • File and Information Storage Symbols: Stored Data, Magnetic Disk, Direct Access - Storage, Internal Storage, Sequential Access Storage - Magnetic Tape

Usage

To use obfc.js the following:

<script src="obfc.js"></script>

and then add svg element to body of a web page.

<svg id="demo" width="600" height="700"> </svg>

and then connect library to the id of the SVG element.

<script>
prepare_SVG("demo");
</script>

Creating SVG Shapes

To draw objects, add_theObject function can be used for the given SVG element.

<script>
var object1 = add_theObject(new Terminal(300, 50, 1, "Hello obfc.js", 20, "<h3>Description in HTML format</h3>"));
var object2 = add_theObject(new Process(300, 150, 1, ["Line 1", "Line 2"], 10));
</script>

add_theObject is a function that adds the object into a given SVG element and returns this object. This returned object is used for drawing lines between two objects. There are 24 different SVG objects in obfc.js. 22 of them contain 9 parameters for creating an object. First two parameters are required, others are optimal.

Object_Name(_middle_x, _middle_y, _size, _text, _text_size, _description, _fill_color, _stroke_color, _text_color);
  • _middle_x and middle_y: centre of the object. (Required)
  • _size: For example, default size of a process object width is 125 and height is 50. _size value is multiplied by these values.
  • _text and _text_size: Text is written in the center of an object. This parameter can be defined string value or array["", ""...]. If your text is too long, you can use array for creating lines.
  • _description: These value can be coded in HTML format. These value is displayed in a HTML element that contains "desc" id after clicking an object or a line.
  • _fill_color: Default value is white. But, the object color can be determined with this parameter.
  • _stroke_color: Default value is black.
  • _text_color: Default value is black. 2 of them (OR and SummingJunction) contain 7 parameter. These objects are not included parameters of _text and _text_size. Object_Name(_middle_x, _middle_y, _size, _description, _fill_color, _stroke_color, _text_color);

Creating Lines Between Objects

After creating all objects, objects can be linked by using draw_theLine function.

<script>
var o_line1 = draw_theLine(new Line(object1, object2, 1, 0, "Text", 12, "<b>Description in HTML format</b>"));
</script>

Line is a function that determines the path for given two objects and their positions. This function has 9 parameters. First two parameter is required and others are optimal.

Line(object1, object2, position1, position2, _text, _text_size, _description, _stroke_color, _text_color)
  • object1 ve object2: are variables that is defined in the previous section.
  • position1 and position2: are position information of objects. There are four positions for all shapes. Top=0, Bottom=1, Left=2 and Right=3. But, when these values are not entered or entered "-1", this function automatically determines these position by calculating differences between all unused positions. (Unused position means that this position is used for creating lines)
  • _text and _text: text in line. This function selects the longest sub-line for writing text.
  • description, _stroke_color, _text_color: (same with previous section)

Animation

(ver 1.2.) Click for more information.

Publications

Object-based flowchart drawing library. Uzun, E.; and Buluş, H., N. In 2017 International Conference on Computer Science and Engineering (UBMK), pages 110-115, 2017.

Object-based Entity Relationship Diagram Drawing Library: EntRel.JS. Uzun, E.; Yerlikaya, T.; and Kırat, O. In 7th International Scientific Conference “TechSys 2018” – Engineering, Technologies and Systems, Technical University of Sofia, Plovdiv Branch May 17-19, pages 114-119, 2018.

Click for bibtex, downloads, all publications...

Licence

Copyright (c) 2017 Erdinç Uzun

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].