Gitlab CSE Unil

Commit 9c82cf4d authored by M. Chardon's avatar M. Chardon
Browse files

correction bug cimaf fieldedge

parent 9e0d918e
Pipeline #43 failed with stages
...@@ -180,9 +180,10 @@ define(["paper"], function (paper) { ...@@ -180,9 +180,10 @@ define(["paper"], function (paper) {
// Update data.points // Update data.points
if (p1s) { if (p1s) {
json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) { json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) {
console.log(p);
return [p.x, p.y] return [p.x, p.y]
}); });
} else {
return null;
} }
// Cleanup useless properties // Cleanup useless properties
......
...@@ -249,7 +249,10 @@ function ($, _, paper, Signal, config, Users, tools) { ...@@ -249,7 +249,10 @@ function ($, _, paper, Signal, config, Users, tools) {
if (annot.data.prop) { if (annot.data.prop) {
obj.prop = annot.data.prop; obj.prop = annot.data.prop;
} }
serializedAnnotations.push(obj); //si l'objet n'a pas de contenu on ne le synchronise pas
if (obj.itemStr) {
serializedAnnotations.push(obj);
}
} }
return serializedAnnotations; return serializedAnnotations;
} }
......
...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) { ...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) {
// Update data.points // Update data.points
if (p1s) { if (p1s) {
json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) { json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) {
console.log(p);
return [p.x, p.y] return [p.x, p.y]
}); });
} else {
return null;
} }
   
// Cleanup useless properties // Cleanup useless properties
...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) { ...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) {
if (annot.data.prop) { if (annot.data.prop) {
obj.prop = annot.data.prop; obj.prop = annot.data.prop;
} }
serializedAnnotations.push(obj); //si l'objet n'a pas de contenu on ne le synchronise pas
if (obj.itemStr) {
serializedAnnotations.push(obj);
}
} }
return serializedAnnotations; return serializedAnnotations;
} }
...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) { ...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) {
// Update data.points // Update data.points
if (p1s) { if (p1s) {
json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) { json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) {
console.log(p);
return [p.x, p.y] return [p.x, p.y]
}); });
} else {
return null;
} }
   
// Cleanup useless properties // Cleanup useless properties
...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) { ...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) {
if (annot.data.prop) { if (annot.data.prop) {
obj.prop = annot.data.prop; obj.prop = annot.data.prop;
} }
serializedAnnotations.push(obj); //si l'objet n'a pas de contenu on ne le synchronise pas
if (obj.itemStr) {
serializedAnnotations.push(obj);
}
} }
return serializedAnnotations; return serializedAnnotations;
} }
...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) { ...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) {
// Update data.points // Update data.points
if (p1s) { if (p1s) {
json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) { json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) {
console.log(p);
return [p.x, p.y] return [p.x, p.y]
}); });
} else {
return null;
} }
   
// Cleanup useless properties // Cleanup useless properties
...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) { ...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) {
if (annot.data.prop) { if (annot.data.prop) {
obj.prop = annot.data.prop; obj.prop = annot.data.prop;
} }
serializedAnnotations.push(obj); //si l'objet n'a pas de contenu on ne le synchronise pas
if (obj.itemStr) {
serializedAnnotations.push(obj);
}
} }
return serializedAnnotations; return serializedAnnotations;
} }
...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) { ...@@ -18763,9 +18763,10 @@ define('tools/fieldedges',["paper"], function (paper) {
// Update data.points // Update data.points
if (p1s) { if (p1s) {
json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) { json[1].data.points = [p1s, p1e, p2s, p2e].map(function (p) {
console.log(p);
return [p.x, p.y] return [p.x, p.y]
}); });
} else {
return null;
} }
   
// Cleanup useless properties // Cleanup useless properties
...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) { ...@@ -24038,7 +24039,10 @@ function ($, _, paper, Signal, config, Users, tools) {
if (annot.data.prop) { if (annot.data.prop) {
obj.prop = annot.data.prop; obj.prop = annot.data.prop;
} }
serializedAnnotations.push(obj); //si l'objet n'a pas de contenu on ne le synchronise pas
if (obj.itemStr) {
serializedAnnotations.push(obj);
}
} }
return serializedAnnotations; return serializedAnnotations;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment