1 /*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22
4 This Source Code Form is subject to the terms of the Mozilla Public
5 License, v. 2.0. If a copy of the MPL was not distributed with this
6 file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 /* This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
14 A complete list of SVG properties that can be set through CSS is here:
15 http://www.w3.org/TR/SVG/styling.html
17 Important note: Presentation attributes have a lower precedence over CSS style rules.
21 /* .viewport is a <g> node wrapping all diagram elements in the paper */
23 -webkit-user-select: none;
24 -moz-user-select: none;
29 1. IE can't handle paths without the `d` attribute for bounding box calculation
30 2. IE can't even handle 'd' attribute as a css selector (e.g path[d]) so the following rule will
31 break the links rendering.
39 /* .magnet is an element that can be either source or a target of a link */
47 pointer-events: visibleStroke;
49 vector-effect: non-scaling-stroke;
57 [magnet=true]:not(.element) {
60 [magnet=true]:not(.element):hover {
66 Elements have CSS classes named by their types. E.g. type: basic.Rect has a CSS class "element basic Rect".
67 This makes it possible to easilly style elements in CSS and have generic CSS rules applying to
68 the whole group of elements. Each plugin can provide its own stylesheet.
73 /* Give the user a hint that he can drag&drop the element. */
78 /* The default behavior when scaling an element is not to scale the stroke in order to prevent the ugly effect of stroke with different proportions. */
79 vector-effect: non-scaling-stroke;
80 -moz-user-select: none;
87 connection-wrap is a <path> element of the joint.dia.Link that follows the .connection <path> of that link.
88 In other words, the `d` attribute of the .connection-wrap contains the same data as the `d` attribute of the
89 .connection <path>. The advantage of using .connection-wrap is to be able to catch pointer events
90 in the neighborhood of the .connection <path>. This is especially handy if the .connection <path> is
99 stroke-linecap: round;
100 stroke-linejoin: round;
104 .connection-wrap:hover {
112 /* stroke width cannot be overriden by attribute? */
113 /* stroke-width: 1; */
115 stroke-linejoin: round;
118 .marker-source, .marker-target {
119 /* Cannot be in CSS otherwise it could not be overruled by attributes.
123 /* This makes the arrowheads point to the border of objects even though the transform: scale() is applied on them. */
124 vector-effect: non-scaling-stroke;
129 Vertex markers are `<circle>` elements that appear at connection vertex positions.
133 /* <g> element wrapping .marker-vertex-group. */
141 cursor: -webkit-grab;
143 /* display: none; */ /* setting `display: none` on .marker-arrowheads effectivelly switches of links reconnecting */
149 .link-tools .tool-options {
150 display: none; /* by default, we don't display link options tool */
152 .link-tools .tool-remove circle {
155 .link-tools .tool-remove path {
158 .link:hover .marker-vertices,
159 .link:hover .marker-arrowheads,
160 .link:hover .link-tools {
164 /* <circle> element inside .marker-vertex-group <g> element */
168 .marker-vertex:hover {
176 .marker-arrowhead:hover {
181 /* <circle> element used to remove a vertex */
182 .marker-vertex-remove {
188 .marker-vertex-group:hover .marker-vertex-remove {
192 .marker-vertex-remove-area {
196 .marker-vertex-group:hover .marker-vertex-remove-area {
200 /* Cell highlighting - e.g a cell underneath the dragged link get highlighted.
201 See joint.dia.cell.js highlight(); */
206 /* For some reason, CSS `outline` property
207 does not work on `<text>` elements. */
212 /* `outline` doesn't work in Firefox, Opera and IE9+.
213 The only engine supporting outlines on SVG elements is Webkit. */
214 @media screen and (-webkit-min-device-pixel-ratio:0) {
216 outline: 2px solid #FF0000;
222 Example of custom changes (in pure CSS only!):
224 Do not show marker vertices at all: .marker-vertices { display: none; }
225 Do not allow adding new vertices: .connection-wrap { pointer-events: none; }
228 /* foreignObject inside the elements (i.e joint.shapes.basic.TextBlock) */
229 .element .fobj body {
230 background-color: transparent;
235 vertical-align: middle;
237 padding: 0px 5px 0px 5px;
243 background-image: none;
246 text.text1, text.text2 {
247 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;