Annotation Tools: Addressing PR Comments from DB
This commit is contained in:
@@ -1035,6 +1035,10 @@ OpenSeadragonAnnotation = function (element, options) {
|
||||
function reloadEditor(){
|
||||
tinymce.EditorManager.execCommand('mceRemoveEditor',true, "annotator-field-0");
|
||||
tinymce.EditorManager.execCommand('mceAddEditor',true, "annotator-field-0");
|
||||
|
||||
// if person hits into/out of fullscreen before closing the editor should close itself
|
||||
// ideally we would want to keep it open and reposition, this would make a great TODO in the future
|
||||
annotator.editor.hide();
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
@@ -1001,6 +1001,9 @@ CatchAnnotation.prototype = {
|
||||
var positionAnnotator = videojs.findPosition(wrapper[0]);
|
||||
var positionAdder = {};
|
||||
|
||||
// the following addition to display makes sure the editor shows up
|
||||
// after opening TinyMCE/editor within the image source
|
||||
positionAdder.display = "block";
|
||||
positionAdder.left = positionLeft.left - positionAnnotator.left;
|
||||
positionAdder.top = positionLeft.top + 20 - positionAnnotator.top;
|
||||
|
||||
@@ -1010,6 +1013,7 @@ CatchAnnotation.prototype = {
|
||||
this.annotator.onAdderClick();
|
||||
|
||||
// Set vertical editor
|
||||
$(this.annotator.editor.element).css(positionAdder);
|
||||
this.annotator.editor.resetOrientation();
|
||||
this.annotator.editor.invertY();
|
||||
|
||||
|
||||
@@ -93,6 +93,17 @@ Annotator.Plugin.RichText = (function(_super) {
|
||||
// set the modification in the textarea of annotator
|
||||
$(editor.element).find('textarea')[0].value = tinymce.activeEditor.getContent();
|
||||
});
|
||||
|
||||
// creates a function called whenever editor is resized
|
||||
ed.on('init', function(mceInstance) {
|
||||
|
||||
// get win means this event activates when window is resized
|
||||
tinymce.dom.Event.bind(ed.getWin(), 'resize', function(e){
|
||||
|
||||
// mceInstance.target gets the editor, its id is used to retrieved iframe
|
||||
$("#"+mceInstance.target.id+"_ifr").css('min-width', '400px');
|
||||
});
|
||||
});
|
||||
// new button to add Rubrics of the url https://gteavirtual.org/rubric
|
||||
ed.addButton('rubric', {
|
||||
icon: 'rubric',
|
||||
|
||||
Reference in New Issue
Block a user