edges finished
This commit is contained in:
1 parent
f52176f800
commit
36c40bb3f1
2 files changed
+13
-6
No files matched your search
@@ -396,19 +396,26 @@ function newEdgeEditor () {
|
||||
break
|
||||
}
|
||||
case 'right' : {
|
||||
if (thisObject.container.parentContainer.frame.width + dragVector.x < MIN_WIDTH && dragVector.x < 0) {
|
||||
return
|
||||
dragVectorWhenDragStarted.y = 0
|
||||
|
||||
let newWidth = dragVectorWhenDragStarted.x + parentFrameWhenDragStarted.width
|
||||
if (newWidth < MIN_WIDTH && dragVectorWhenDragStarted.x < 0) {
|
||||
dragVectorWhenDragStarted.x = MIN_WIDTH - parentFrameWhenDragStarted.width
|
||||
}
|
||||
|
||||
let point = {
|
||||
x: dragVector.x + thisObject.container.frame.width,
|
||||
y: dragVector.y
|
||||
x: dragVectorWhenDragStarted.x + parentFrameWhenDragStarted.width + parentFrameWhenDragStarted.position.x,
|
||||
y: 0
|
||||
}
|
||||
snapPointToGrid(point)
|
||||
let newMaxDate = getDateFromPointAtContainer(point, thisObject.container.parentContainer, coordinateSystem)
|
||||
point.x = point.x - parentFrameWhenDragStarted.position.x
|
||||
|
||||
thisObject.container.parentContainer.frame.width = point.x
|
||||
|
||||
/* This is equivalent to getRateFromPointAtContainer, but as we do not have a container anymore because we already change it, we do it like this. */
|
||||
point = coordinateSystemWhenDragStarted.unInverseTransform(point, parentFrameWhenDragStarted.width)
|
||||
let newMaxDate = point.x
|
||||
|
||||
switch (whatHappened) {
|
||||
case 'left mouse button': {
|
||||
coordinateSystem.max.x = newMaxDate.valueOf()
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ const PERIOD_01_MIN = "01-min";
|
||||
We define here the size of the chartingSpace. It has to bee enough big in order to accomodate all the charts we expect to display in this space.
|
||||
*/
|
||||
|
||||
const TIME_MACHINE_WIDTH = 320;
|
||||
const TIME_MACHINE_WIDTH = 250;
|
||||
const TIME_MACHINE_HEIGHT = 120;
|
||||
|
||||
let mediaRecorder // to downloadText canvas animation as a mediaRecorder
|
||||
|
||||
Reference in new issue
Block a user