mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-28 02:27:57 +08:00
smaller grid steps set. In addition enddpoint bug was fixed
SCI 170, SCI 292'
This commit is contained in:
parent
ae7eb18af8
commit
696075bf0f
1 changed files with 31 additions and 5 deletions
|
@ -46,8 +46,12 @@ var DEFAULT_CONNECTOR_STYLE_2 =
|
||||||
};
|
};
|
||||||
|
|
||||||
// Zoom-level specific variables
|
// Zoom-level specific variables
|
||||||
var GRID_DIST_EDIT_X = 300;
|
//var GRID_DIST_EDIT_X = 300;
|
||||||
var GRID_DIST_EDIT_Y = 135;
|
//var GRID_DIST_EDIT_Y = 140; //135
|
||||||
|
var GRID_DIST_EDIT_X = 10;
|
||||||
|
var GRID_DIST_EDIT_Y = 10;
|
||||||
|
var GRID_DIST_EDIT_STEP_X = 10;
|
||||||
|
var GRID_DIST_EDIT_STEP_Y = 10;
|
||||||
var EDIT_ENDPOINT_STYLE =
|
var EDIT_ENDPOINT_STYLE =
|
||||||
[ "Dot", {
|
[ "Dot", {
|
||||||
radius: 4,
|
radius: 4,
|
||||||
|
@ -61,12 +65,25 @@ var EDIT_CONNECTOR_STYLE_2 =
|
||||||
outlineColor: "transparent",
|
outlineColor: "transparent",
|
||||||
outlineWidth: 0
|
outlineWidth: 0
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
var GRID_DIST_FULL_X = 340;
|
var GRID_DIST_FULL_X = 340;
|
||||||
var GRID_DIST_FULL_Y = 201;
|
var GRID_DIST_FULL_Y = 201;
|
||||||
var GRID_DIST_MEDIUM_X = 250;
|
var GRID_DIST_MEDIUM_X = 250;
|
||||||
var GRID_DIST_MEDIUM_Y = 88;
|
var GRID_DIST_MEDIUM_Y = 88;
|
||||||
var GRID_DIST_SMALL_X = 100;
|
var GRID_DIST_SMALL_X = 100;
|
||||||
var GRID_DIST_SMALL_Y = 100;
|
var GRID_DIST_SMALL_Y = 100;
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Migrations: multiply my_modules (x by 32, y by 16)
|
||||||
|
UPDATE my_modules SET x=x*32, y=y*16
|
||||||
|
themodel.connection.execute("UPDATE my_modules SET x=x*32, y=y*16")
|
||||||
|
*/
|
||||||
|
var GRID_DIST_FULL_X = 12;
|
||||||
|
var GRID_DIST_FULL_Y = 12;
|
||||||
|
var GRID_DIST_MEDIUM_X = 8;
|
||||||
|
var GRID_DIST_MEDIUM_Y = 8;
|
||||||
|
var GRID_DIST_SMALL_X = 5;
|
||||||
|
var GRID_DIST_SMALL_Y = 5;
|
||||||
var SUBMIT_FORM_NAME_SEPARATOR = "|";
|
var SUBMIT_FORM_NAME_SEPARATOR = "|";
|
||||||
|
|
||||||
//************************************
|
//************************************
|
||||||
|
@ -168,8 +185,8 @@ function initializeEdit() {
|
||||||
"div.module",
|
"div.module",
|
||||||
{
|
{
|
||||||
scrollEnabled: true,
|
scrollEnabled: true,
|
||||||
gridDistX: GRID_DIST_EDIT_X,
|
gridDistX: GRID_DIST_EDIT_STEP_X,
|
||||||
gridDistY: GRID_DIST_EDIT_Y,
|
gridDistY: GRID_DIST_EDIT_STEP_Y,
|
||||||
endpointStyle: EDIT_ENDPOINT_STYLE,
|
endpointStyle: EDIT_ENDPOINT_STYLE,
|
||||||
connectorStyle2: EDIT_CONNECTOR_STYLE_2,
|
connectorStyle2: EDIT_CONNECTOR_STYLE_2,
|
||||||
zoomEnabled: true,
|
zoomEnabled: true,
|
||||||
|
@ -2850,6 +2867,10 @@ function initJsPlumb(containerSel, containerChildSel, modulesSel, params) {
|
||||||
// this listener sets the connection's internal
|
// this listener sets the connection's internal
|
||||||
// id as the label overlay's text.
|
// id as the label overlay's text.
|
||||||
instance.bind("connection", function (info) {
|
instance.bind("connection", function (info) {
|
||||||
|
_.each(instance.getAllConnections(), function(conn) {
|
||||||
|
conn.endpoints[0].setEnabled(false);
|
||||||
|
conn.endpoints[1].setEnabled(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Bind a click listener to each connection
|
// Bind a click listener to each connection
|
||||||
|
@ -2901,11 +2922,16 @@ function initJsPlumb(containerSel, containerChildSel, modulesSel, params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable/disable connection endpoints
|
// Enable/disable connection endpoints
|
||||||
|
/*
|
||||||
_.each(instance.getAllConnections(), function(conn) {
|
_.each(instance.getAllConnections(), function(conn) {
|
||||||
conn.endpoints[0].setEnabled(connectionsEditable);
|
conn.endpoints[0].setEnabled(connectionsEditable);
|
||||||
conn.endpoints[1].setEnabled(connectionsEditable);
|
conn.endpoints[1].setEnabled(connectionsEditable);
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
_.each(instance.getAllConnections(), function(conn) {
|
||||||
|
conn.endpoints[0].setEnabled(false);
|
||||||
|
conn.endpoints[1].setEnabled(false);
|
||||||
|
});
|
||||||
// Update style on existing connections
|
// Update style on existing connections
|
||||||
if (connectionsEditable) {
|
if (connectionsEditable) {
|
||||||
_.each(instance.getAllConnections(), function(conn) {
|
_.each(instance.getAllConnections(), function(conn) {
|
||||||
|
|
Loading…
Reference in a new issue