app/scripts/window/directives/er_diagram.js
Function controller
has 352 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: ["$scope", function($scope) {
$scope.drawModel = function(model, element) {
if ($scope.positionProvider) {
$scope.positionProvider({
model: model,
File er_diagram.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function() {
"use strict";
// --- Model
Function drawEntity
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var drawEntity = function(model, entity, x, y, element) {
var canvas = getCanvas(element);
// Event handlers
var onDragHandler = (function(model, element) {
Function compile
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compile: function(element, attrs) {
setJCanvasDefaults();
return function(scope, element, attrs, ctrl) {
scope.$watch("model", (function(element) {
return function(newVal, oldVal) {
Function drawConnection
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var drawConnection = function(connection, element) {
var canvas = getCanvas(element);
var source = connection.getSource();
var sourceBorderLayer = canvas.getLayer(
source.getEntity().getName() + "-border");
Function getStoredPositionCalculator
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getStoredPositionCalculator = function(dimensions) {
return (function(dimensions) {
var offsetX = 30;
var offsetY = 30;
var existsPosition = false;
Function getShortPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getShortPosition = function(source, target) {
var source1 = source.x;
var source2 = source.x + source.width;
var target1 = target.x;
var target2 = target.x + target.width;
Function getBasicPositionCalculator
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getBasicPositionCalculator = function(model) {
return (function(model) {
var startX = 30;
var startY = 30;
var offsetX = startX;
Function drawText
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var drawText = function(x, y, text, name, group, onDragHandler, onDragEndHandler, canvas) {
Function drawEntity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var drawEntity = function(model, entity, x, y, element) {