mirror of
https://github.com/nasa/openmct.git
synced 2025-05-14 22:43:40 +00:00
* snapshot - when taking a snapshot of overlay, select object-holder vs the entire overlay. This fixes plots not being captured * remove new Notebook entry from context menu - fixes issue #2098 * add licence information for Painterro - fixes issue #2108 * add watch for defaultSort - fixes issue 2102 * dont allow snapshot action from imagery * fix checkstyle error
This commit is contained in:
parent
d7eb4c17ca
commit
5af14cd3b9
@ -58,7 +58,8 @@ define([
|
|||||||
"model": {
|
"model": {
|
||||||
"entries": [],
|
"entries": [],
|
||||||
"composition": [],
|
"composition": [],
|
||||||
"entryTypes": []
|
"entryTypes": [],
|
||||||
|
"defaultSort": "-createdOn"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
@ -236,7 +237,6 @@ define([
|
|||||||
"cssClass": "icon-notebook labeled",
|
"cssClass": "icon-notebook labeled",
|
||||||
"description": "Add a new Notebook entry",
|
"description": "Add a new Notebook entry",
|
||||||
"category": [
|
"category": [
|
||||||
"contextual",
|
|
||||||
"view-control"
|
"view-control"
|
||||||
],
|
],
|
||||||
"depends": [
|
"depends": [
|
||||||
@ -252,13 +252,13 @@ define([
|
|||||||
"licenses": [
|
"licenses": [
|
||||||
{
|
{
|
||||||
"name": "painterro",
|
"name": "painterro",
|
||||||
"version": "4.1.0",
|
"version": "0.2.65",
|
||||||
"author": "Mike Bostock",
|
"author": "Ivan Borshchov",
|
||||||
"description": "D3 (or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data.",
|
"description": "Painterro is JavaScript paint widget which allows editing images directly in a browser.",
|
||||||
"website": "https://d3js.org/",
|
"website": "https://github.com/ivictbor/painterro",
|
||||||
"copyright": "Copyright 2010-2016 Mike Bostock",
|
"copyright": "Copyright 2017 Ivan Borshchov",
|
||||||
"license": "BSD-3-Clause",
|
"license": "MIT",
|
||||||
"link": "https://github.com/d3/d3/blob/master/LICENSE"
|
"link": "https://github.com/ivictbor/painterro/blob/master/LICENSE"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"capabilities": [
|
"capabilities": [
|
||||||
|
@ -185,7 +185,18 @@ define(
|
|||||||
|
|
||||||
NewEntryContextual.appliesTo = function (context) {
|
NewEntryContextual.appliesTo = function (context) {
|
||||||
var domainObject = context.domainObject;
|
var domainObject = context.domainObject;
|
||||||
return !!(domainObject && domainObject.getModel().type !== 'notebook');
|
|
||||||
|
if (domainObject) {
|
||||||
|
if (domainObject.getModel().type === 'Notebook') {
|
||||||
|
// do not allow in context of a notebook
|
||||||
|
return false;
|
||||||
|
} else if (domainObject.getModel().type.includes('imagery')) {
|
||||||
|
// do not allow in the context of an object with imagery
|
||||||
|
// (because of cross domain issue with snapshot)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
return NewEntryContextual;
|
return NewEntryContextual;
|
||||||
|
@ -42,7 +42,7 @@ define(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
$scope.entriesEl = $(document.body).find('.t-entries-list');
|
$scope.entriesEl = $(document.body).find('.t-entries-list');
|
||||||
$scope.sortEntries = $scope.domainObject.getModel().defaultSort || "-createdOn";
|
$scope.sortEntries = $scope.domainObject.getModel().defaultSort;
|
||||||
$scope.showTime = "0";
|
$scope.showTime = "0";
|
||||||
$scope.editEntry = false;
|
$scope.editEntry = false;
|
||||||
$scope.entrySearch = '';
|
$scope.entrySearch = '';
|
||||||
@ -354,6 +354,11 @@ define(
|
|||||||
|
|
||||||
$scope.$watchCollection("composition", refreshComp);
|
$scope.$watchCollection("composition", refreshComp);
|
||||||
|
|
||||||
|
$scope.$watch('domainObject.getModel().defaultSort', function (newDefaultSort, oldDefaultSort) {
|
||||||
|
if (newDefaultSort !== oldDefaultSort) {
|
||||||
|
$scope.sortEntries = newDefaultSort;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$scope.$on('$destroy', function () {});
|
$scope.$on('$destroy', function () {});
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ define(['zepto'], function ($) {
|
|||||||
var document = $document[0];
|
var document = $document[0];
|
||||||
|
|
||||||
function link($scope, $element, $attrs) {
|
function link($scope, $element, $attrs) {
|
||||||
var objectElement = $(document.body).find('.overlay')[0] || $(document.body).find("[key='representation.selected.key']")[0],
|
var objectElement = $(document.body).find(".overlay .object-holder")[0] || $(document.body).find("[key='representation.selected.key']")[0],
|
||||||
takeSnapshot,
|
takeSnapshot,
|
||||||
makeImg,
|
makeImg,
|
||||||
saveImg;
|
saveImg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user