diff --git a/karma.conf.js b/karma.conf.js
index 9a70d3d041..59c55ec05b 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -86,7 +86,7 @@ module.exports = (config) => {
reports: ['html', 'lcovonly', 'text-summary'],
thresholds: {
global: {
- lines: 64
+ lines: 65
}
}
},
diff --git a/platform/forms/bundle.js b/platform/forms/bundle.js
index 11cf1a5d4f..1c81db3936 100644
--- a/platform/forms/bundle.js
+++ b/platform/forms/bundle.js
@@ -30,7 +30,6 @@ define([
"./src/controllers/CompositeController",
"./src/controllers/ColorController",
"./src/controllers/DialogButtonController",
- "./src/controllers/SnapshotPreviewController",
"./res/templates/controls/autocomplete.html",
"./res/templates/controls/checkbox.html",
"./res/templates/controls/datetime.html",
@@ -44,8 +43,7 @@ define([
"./res/templates/controls/menu-button.html",
"./res/templates/controls/dialog.html",
"./res/templates/controls/radio.html",
- "./res/templates/controls/file-input.html",
- "./res/templates/controls/snap-view.html"
+ "./res/templates/controls/file-input.html"
], function (
MCTForm,
MCTControl,
@@ -56,7 +54,6 @@ define([
CompositeController,
ColorController,
DialogButtonController,
- SnapshotPreviewController,
autocompleteTemplate,
checkboxTemplate,
datetimeTemplate,
@@ -70,8 +67,7 @@ define([
menuButtonTemplate,
dialogTemplate,
radioTemplate,
- fileInputTemplate,
- snapViewTemplate
+ fileInputTemplate
) {
return {
@@ -157,10 +153,6 @@ define([
{
"key": "file-input",
"template": fileInputTemplate
- },
- {
- "key": "snap-view",
- "template": snapViewTemplate
}
],
"controllers": [
@@ -194,14 +186,6 @@ define([
"$scope",
"dialogService"
]
- },
- {
- "key": "SnapshotPreviewController",
- "implementation": SnapshotPreviewController,
- "depends": [
- "$scope",
- "openmct"
- ]
}
],
"components": [
diff --git a/platform/forms/res/templates/controls/snap-view.html b/platform/forms/res/templates/controls/snap-view.html
deleted file mode 100644
index 72dcdac4c1..0000000000
--- a/platform/forms/res/templates/controls/snap-view.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- Annotate
-
-
-
\ No newline at end of file
diff --git a/platform/forms/src/controllers/SnapshotPreviewController.js b/platform/forms/src/controllers/SnapshotPreviewController.js
deleted file mode 100644
index 6157e09154..0000000000
--- a/platform/forms/src/controllers/SnapshotPreviewController.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/*****************************************************************************
- * Open MCT, Copyright (c) 2014-2020, United States Government
- * as represented by the Administrator of the National Aeronautics and Space
- * Administration. All rights reserved.
- *
- * Open MCT is licensed under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0.
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- * Open MCT includes source code licensed under additional open source
- * licenses. See the Open Source Licenses file (LICENSES.md) included with
- * this source code distribution or the Licensing information page available
- * at runtime from the About dialog for additional information.
- *****************************************************************************/
-
-define(
- [
- 'painterro'
- ],
- function (Painterro) {
-
- function SnapshotPreviewController($scope, openmct) {
-
- $scope.previewImage = function (imageUrl) {
- let imageDiv = document.createElement('div');
- imageDiv.classList = 'image-main s-image-main';
- imageDiv.style.backgroundImage = `url(${imageUrl})`;
-
- let previewImageOverlay = openmct.overlays.overlay(
- {
- element: imageDiv,
- size: 'large',
- buttons: [
- {
- label: 'Done',
- callback: function () {
- previewImageOverlay.dismiss();
- }
- }
- ]
- }
- );
- };
-
- $scope.annotateImage = function (ngModel, field, imageUrl) {
- $scope.imageUrl = imageUrl;
-
- let div = document.createElement('div'),
- painterroInstance = {},
- save = false;
-
- div.id = 'snap-annotation';
-
- let annotateImageOverlay = openmct.overlays.overlay(
- {
- element: div,
- size: 'large',
- buttons: [
- {
- label: 'Cancel',
- callback: function () {
- save = false;
- painterroInstance.save();
- annotateImageOverlay.dismiss();
- }
- },
- {
- label: 'Save',
- callback: function () {
- save = true;
- painterroInstance.save();
- annotateImageOverlay.dismiss();
- }
- }
- ]
- }
- );
-
- painterroInstance = Painterro({
- id: 'snap-annotation',
- activeColor: '#ff0000',
- activeColorAlpha: 1.0,
- activeFillColor: '#fff',
- activeFillColorAlpha: 0.0,
- backgroundFillColor: '#000',
- backgroundFillColorAlpha: 0.0,
- defaultFontSize: 16,
- defaultLineWidth: 2,
- defaultTool: 'ellipse',
- hiddenTools: ['save', 'open', 'close', 'eraser', 'pixelize', 'rotate', 'settings', 'resize'],
- translation: {
- name: 'en',
- strings: {
- lineColor: 'Line',
- fillColor: 'Fill',
- lineWidth: 'Size',
- textColor: 'Color',
- fontSize: 'Size',
- fontStyle: 'Style'
- }
- },
- saveHandler: function (image, done) {
- if (save) {
- let url = image.asBlob(),
- reader = new window.FileReader();
-
- reader.readAsDataURL(url);
- reader.onloadend = function () {
- $scope.imageUrl = reader.result;
- ngModel[field] = reader.result;
- };
- } else {
- ngModel.field = imageUrl;
- console.warn('You cancelled the annotation!!!');
- }
-
- done(true);
- }
- }).show(imageUrl);
- };
- }
-
- return SnapshotPreviewController;
- }
-);
diff --git a/src/plugins/notebook/components/menu-items.vue b/src/plugins/notebook/components/MenuItems.vue
similarity index 100%
rename from src/plugins/notebook/components/menu-items.vue
rename to src/plugins/notebook/components/MenuItems.vue
diff --git a/src/plugins/notebook/components/notebook.vue b/src/plugins/notebook/components/Notebook.vue
similarity index 97%
rename from src/plugins/notebook/components/notebook.vue
rename to src/plugins/notebook/components/Notebook.vue
index 51c1c5bb7a..44367162ca 100644
--- a/src/plugins/notebook/components/notebook.vue
+++ b/src/plugins/notebook/components/Notebook.vue
@@ -9,10 +9,11 @@