Skip to content

Commit

Permalink
Merge pull request #138 from philips-emr/create-icon-rhombus
Browse files Browse the repository at this point in the history
Criação do novo icone de Losango conforme SPEC designer
  • Loading branch information
masborchardt authored May 17, 2024
2 parents 306fa0c + 18ff389 commit 2e49b38
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 25 deletions.
15 changes: 14 additions & 1 deletion dist/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library.
*
* @version 4.15.4
* @date 2023-09-21
* @date 2024-05-16
*
* @license
* Copyright (C) 2011-2016 Almende B.V, http://almende.com
Expand Down Expand Up @@ -7867,6 +7867,19 @@ return /******/ (function(modules) { // webpackBootstrap
points.push(polygonCross);
points.push(polygonUp);
break;
case 'rhombus':
if (!isNaN(y) && !isNaN(x)) {
var xRect = x - 0.5 * groupTemplate.size;
var yRect = y - 0.5 * groupTemplate.size;
var rhombus = exports.getSVGElement('rect', JSONcontainer, svgContainer);
rhombus.setAttributeNS(null, 'x', xRect + 1);
rhombus.setAttributeNS(null, 'y', yRect - 0.5 * groupTemplate.size);
rhombus.setAttributeNS(null, 'width', groupTemplate.size);
rhombus.setAttributeNS(null, 'height', groupTemplate.size);
rhombus.setAttributeNS(null, 'transform', 'rotate(45, ' + xRect + ', ' + yRect + ')');
points.push(rhombus);
}
break;
case 'rectangle':
if (!isNaN(y) && !isNaN(x)) {
var rectangle = exports.getSVGElement('rect', JSONcontainer, svgContainer);
Expand Down
2 changes: 1 addition & 1 deletion dist/vis.map

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions dist/vis.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions lib/DOMutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,19 @@ exports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, l
points.push(polygonCross);
points.push(polygonUp);
break;
case 'rhombus':
if (!isNaN(y) && !isNaN(x)) {
const xRect = x - 0.5 * groupTemplate.size;
const yRect = y - 0.5 * groupTemplate.size;
const rhombus = exports.getSVGElement('rect', JSONcontainer, svgContainer);
rhombus.setAttributeNS(null, 'x', xRect + 1);
rhombus.setAttributeNS(null, 'y', yRect - 0.5 * groupTemplate.size);
rhombus.setAttributeNS(null, 'width', groupTemplate.size);
rhombus.setAttributeNS(null, 'height', groupTemplate.size);
rhombus.setAttributeNS(null, 'transform', `rotate(45, ${xRect}, ${yRect})`);
points.push(rhombus);
}
break;
case 'rectangle':
if (!isNaN(y) && !isNaN(x)) {
const rectangle = exports.getSVGElement('rect', JSONcontainer, svgContainer);
Expand Down

0 comments on commit 2e49b38

Please sign in to comment.