Skip to content

Commit cec0dee

Browse files
committed
style changes to assistant
1 parent c9e6e5f commit cec0dee

File tree

6 files changed

+913
-905
lines changed

6 files changed

+913
-905
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ apps/landing/jquery.min.js
1212
apps/landing/jquery.scrollex.min.js
1313
apps/segment/opencv.js
1414
common/bootstrap-tour-standalone/bootstrap-tour-standalone.min.js
15+
apps/viewer/turf.min.js

apps/viewer/init.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function initCore() {
314314
$UI.annotPopup.open(e.position);
315315
});
316316

317-
$CAMIC.viewer.addHandler('annot-edit-save', function (e) {
317+
$CAMIC.viewer.addHandler('annot-edit-save', function(e) {
318318
if (!e.data) {
319319
return;
320320
}
@@ -327,16 +327,16 @@ function initCore() {
327327
const dataSize = dataCopy.geometries.features[0].properties.size;
328328
const {points, bound, size} = convertToNormalized(dataPoints, dataSize, $CAMIC.viewer);
329329
dataCopy.geometries.features[0].properties.size = size;
330-
dataCopy.geometries.features[0].geometry.coordinates = [points]
331-
dataCopy.geometries.features[0].bound.coordinates = [bound]
330+
dataCopy.geometries.features[0].geometry.coordinates = [points];
331+
dataCopy.geometries.features[0].bound.coordinates = [bound];
332332
} else {
333333
dataCopy.geometries = ImageFeaturesToVieweportFeatures(
334-
$CAMIC.viewer,
335-
dataCopy.geometries
336-
)
334+
$CAMIC.viewer,
335+
dataCopy.geometries,
336+
);
337337
}
338338
editAnnoCallback(id, slide, dataCopy);
339-
})
339+
});
340340

341341
// create the message bar TODO for reading slide Info TODO
342342
$UI.slideInfos = new CaMessage({
@@ -845,7 +845,7 @@ async function initUIcomponents() {
845845
// $UI.AssistantViewer.enableBtn.checked = false;
846846
$UI.AssistantViewer.elt.style.display = 'none';
847847
}
848-
})
848+
});
849849

850850
// create UI and set data
851851
$UI.layersViewer = createLayerViewer(
@@ -968,11 +968,11 @@ async function initUIcomponents() {
968968
// Handle event
969969
$CAMIC.viewer.addHandler('open-add-model', () => {
970970
uploadModel();
971-
})
971+
});
972972

973973
$CAMIC.viewer.addHandler('open-model-info', () => {
974974
showInfo();
975-
})
975+
});
976976

977977
$CAMIC.viewer.addHandler('ml-draw-setting-change', () => {
978978
if (!$CAMIC.viewer.canvasDrawInstance) return;
@@ -981,7 +981,7 @@ async function initUIcomponents() {
981981
if (canvasDraw._draws_data_.length) {
982982
canvasDraw.__endNewFeature(true);
983983
}
984-
})
984+
});
985985
}
986986

987987
function initModelModals() {
@@ -1150,7 +1150,7 @@ async function uploadModel() {
11501150
const value = element.split('/').pop();
11511151
if (value.slice(0, 3) == 'seg') {
11521152
const title = element.split('/').pop().split('_')[1].slice(0, -3);
1153-
console.log()
1153+
console.log();
11541154
modelName.push(title);
11551155
}
11561156
});

apps/viewer/uicallbacks.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,8 @@ function annoCallback(data) {
979979
}
980980

981981
function editAnnoCallback(id, slide, annotJson) {
982-
// save edit annotation
983-
$CAMIC.store
982+
// save edit annotation
983+
$CAMIC.store
984984
.updateMaskEdit(id, slide, annotJson)
985985
.then((data) => {
986986
// server error
@@ -2092,10 +2092,10 @@ function savePresetLabel() {
20922092
// many brush
20932093
const values = features.reduce((p, f) => {
20942094
return p.concat(getGrids(
2095-
f.geometry.coordinates[0],
2096-
f.properties.size,
2095+
f.geometry.coordinates[0],
2096+
f.properties.size,
20972097
));
2098-
},[]);
2098+
}, []);
20992099
const set = new Set();
21002100
values.map((i) => i.toString()).forEach((v) => set.add(v));
21012101
const points = Array.from(set).map((d) => d.split(','));

0 commit comments

Comments
 (0)