ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo dP dP oo 88 88 .d8888b. dP dP dP 88 .8P dP .d8888b. dP dP dP .d8888b. 88d888b. 88' `88 88 88 88 88 d8' 88 88ooood8 88 88 88 88ooood8 88' `88 88. .88 88.88b.88' 88 .d8P 88 88. ... 88.88b.88' 88. ... 88 `88888P8 8888P Y8P 888888' dP `88888P' 8888P Y8P `88888P' dP ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ================================================================================ awViewer v0.3.05 CHANGELOG ================================================================================ Changes in 0.3.05: Author: Alexander Wright Date: 19 August 2020 1) replace code for openSSL access infoArray.php $slide_info = file_get_contents($info_string, false, $stream_context); where $stream_context is set in slide_server.php awViewer_xml.php libxml_set_streams_context($stream_context); above $xml = simplexml_load_file($xml_string); where $stream_context is set in slide_server.php ================================================================================ TO DO ================================================================================ TODO: Check if slide info array is empty and abort load if so viewer.php line 10 .) annotation lines look messy - either get rid or layer on top of everything .) if annotation is selected don't list jump? means line connectors go off screen... .) one arrowhead is not filled with colour .) Clicking annotation text box selects but doesn't apply highlight style to annotation line - look at line 372 on annotations.php .) maybe make connectors thinner or transparent so they're not confused with the line annotations .) also have them on top of all annotations? .) Make end stop markers for line annotations (like arrow heads) .) Update point annotation to be a crosshair / something similar 1) Address multiple browser issues: - Fix SVG scaling in IE - Firefox some elements are clickable to select, some are not 2) OPTIMISE: Create single functions rather than one function per annotation 3) Change annotations to JS Objects, and remove dependency on PHP for most tasks - PHP creates static code, it needs to be more dynamic - Change $line_colour from PHP to JS variable, so can be changed on the fly - There are lots of functions for specific annotations. It would be better if these were in a single class 4) Begin adding in drawing functionality 5) Add a loading modal for loading javascript files - add async to each js embed - add loadCheck() function to onload="" of every embed - every function onload sets a variable to true and calls checkLoaded - function checkLoaded has if statement for every load check. - if all are true, remove loading modal ================================================================================ Changes in 0.3.04: Author: Alexander Wright Date: 21 February 2019 1) Bug with Pythagoras calculation on length of line annotations 2) Bug with polygon length and area - starting from count(x_list) rather than count(x_list) - 1 - MPP squared is pixel area 8 (mpp * mpp) 3) Moved functions above for loop so that they are not calling undefined functions 4) Changed contents of $(window).resize(function () { ... to own function called refitEverythingToWindow(); - can be called in other places now 5) Disabled MS Edge support 6) Added refitEverythingToWindow(); viewer.viewport.zoomBy(0.99999); to end of annotations .php JS code so that viewport updates and arrowheads resize to normal 7) Added loading.php to modals - - showLoadingModal() - hideLoadingModal() To mask the loading of XML files at the wrong size before step 6 corrects it 8) Added JS count of annotations loaded - to add to loading modal ================================================================================ Changes in 0.3.03: Author: Alexander Wright Date: 21 February 2019 1) Made changes to annotations on mobile - if mobile detected, set number of annotations to -1 2) Reduced number of buttons on mobile menu (removed zoom and fixed rotate) 3) Fixed bug to centre annotations in middle of screen, minus the annotations text bar, when navigating to them 4) Made all types of annotation selectable on click, storing id in variable selected_annotation_id and updating annotation style (and connector lines) to look different. Includes: - Deselecting all currently selected annotation when selecting a new one - Unbinding existing event listeners and rebinding new ones - Selection causes viewer to centre and zoom to annotation (deselecting doesn't) - Selecting annotation scrolls corresponding text div into view - Colour of connector changes for selected annotation 5) Implemented key bindings for navigating to next and previous annotations: - , to go back - . to go forward - / to deselect when at the first or last annotation, simply stops (doesn't deselect) 6) Highlighting an annotation brings its corresponding text div into view (in list) 7) Added dedicated line annotation rather than using Polygon 8) Implemented text boxes for all annotations, regardless of whether they have text assigned to them or not 8) Added annotation stats for the text boxes, specific to the annotation type: - Line has length in microns and pixels - Polygon has length and area in microns and pixels - Rectangle has area in microns and pixels - Ellipse has area in microns and pixels - Arrow has x y co ordinates - Point has x y co ordinates 9) Fixed bug with polygon connector not connecting to rightmost X co-ord 10) Connector to arrows now points to arrowhead only (not rightmost) 11) Viewer zooms to getHomeZoom() for large annotations, if the fit_factor makes the zoom less than the original home zoom (fit slide to screen). 12) Fixed textbox mouseover highlight function - now highlights arrowhead 13) PHP Error logs recording hundreds of notices for "Undefined offset: 2 in..." This was due to the for loop for marker dots being commented out, so the PHP echo of the for loop iterator has been commented out Also some issues with other for loops going out of range and undefined offsets were fixed ================================================================================ TO DO ================================================================================ 1) Address multiple browser issues: - Fix SVG scaling in IE - Firefox some elements are clickable to select, some are not 2) OPTIMISE: Create single functions rather than one function per annotation 3) Change annotations to JS Objects, and remove dependency on PHP for most tasks - PHP creates static code, it needs to be more dynamic - Change $line_colour from PHP to JS variable, so can be changed on the fly - There are lots of functions for specific annotations. It would be better if these were in a single class 4) Begin adding in drawing functionality 5) Add a loading modal for loading javascript files - add async to each js embed - add loadCheck() function to onload="" of every embed - every function onload sets a variable to true and calls checkLoaded - function checkLoaded has if statement for every load check. - if all are true, remove loading modal ================================================================================ Changes in 0.3.02: Author: Alexander Wright Date: 19 February 2019 1) Fixed bug with connectLabels() calculating position using external web page elements (to the viewer) 2) Fixed bug with toggleTopBars() web page UI function to work with slide library (no nav bar) and slide browser (breadcrumb bar included) 3) Fixed bug with showConnector and hideConnector function name typos 4) Fixed bug with connector lines being in wrong place after rotate and flip view (added connectLabels() after) - after checking if function exists - php doesn't generate the function if there are no annotations 5) Fixed connectLabels() bug when switching between fullscreen / no bars / thumbnail - uses viewer.addHandler('resize', function() ... to call it 6) Disabled annotations in IE by default - Added in IE checking for shortcut keys, and provided dialog confirmation asking if user wishes to proceed with an unsupported browser. 7) Fixed bug which crashes when displaying annotations with no labels (has no text box or connectors etc) 8) Added support for Ellipse annotations 9) Added support for Line annotations - Simply a line. No end markers yet 10) Added support for Point (Counter) annotations - XML is one XY co-ord. Added as a circle with fixed radius of 50px 11) Added support for Arrow annotations - Tried D3 Line markers - too inflexible and stay at same size - arrow heads are drawn using trigonometry - size is set to 30px, and does not scale when zooming - fixed bugs with positioning - optimised graphical updates when animating (separate zoom from pan) 12) Stress tests for large numbers of various annotations: - 270 Box annotations w/o text [checked] 13) Fixed bug with navigateToAnnotation_XXX() on polygons - Vertical position is too high - Issue resolved by using the y position as a proportion of slide width rather than height: var panto_y_scale = panto_y / ; - This is counter intuitive, and similar to point 1 in 0.3.01: svg_x = x / slide_width svg_y = y / slide_width 14) Various UI visual and positioning tweaks ================================================================================ TO DO ================================================================================ 1) Fix SVG scaling in IE 2) Be able to select an annotation (stays highlighted / changes colour on click) 3) Navigate between annotations using arrow keys 4) Change $line_colour from PHP to JS variable, so can be changed on the fly 5) Hide notes bar if none of the annotations have text (different to hide if no annotations) 6) Begin adding in drawing functionality ================================================================================ Changes in 0.3.01: Author: Alexander Wright Date: 29 January 2019 1) Added Annotation viewing support - reads in XML files on server - converts files to PHP array of coordinates - converts PHP array items to SVG shapes with corresponding points - draws either rectangle or polygon annotations (not circle, line or point) Draws on: <...> - draw annotations in single colour set by php variables in awViewer.php - draw black lines over annotations for visual definition - created a hideable side panel for displaying annotation text (referred to as Notes) - on mouseover of a specific note, an SVG line drawn from HR inside note div connects to the annotation, highlighting which one it relates to - on mouseover of annotation, the same line connecting to the notes div is revealed - on click of annotation, viewport navigates to centre of annotation, and scales zoom to fit within 70% of the screen width/height - same with clicking annotations - identified issue with scaling of co-ords to SVG percentages - currently using: svg_x = x / slide_width svg_y = y / slide_width rather than dividing y by slide height - Toggle visibility of annotations using button in control menu or N key 2) Identified issue with IE not scaling SVGs. Will investigate in next version - for now, annotations are disabled in IE 3) Added pinch rotate functionality - for mobile users only - toggle button to enable / disable (R key if no annotations) - entering mode disables pinch zoom 4) Enabled Thumbnail navigator to be hidden - Toggle switch in control menu or T key - Changes height of Notes div to fill right hand side of OSD viewport 5) Added Debug Modal - Shift+D to open - displays x,y co-ords for web, viewport and image - displays image zoom and OSD zoom 6) Added extra shortcut Keys About Software: I Move Up: W Move Down: S Move Left: A Move Right: D Toggle Menu: M Home (Reset View): H Toggle Thumbnail: T Zoom In: Z Zoom Out: X Toggle Pinch Rotate: R Rotate Left: Q Rotate Right: E Flip Horizontally: F View Fullscreen: V Screen Capture: C Toggle Notes: N Image Stats: Shift + S Debug Info: Shift + D 7) Added checks to all shortcut keys for holding ctrl and shift 8) Addressed issue with entering fullscreen and hiding top bars - Makes the thumbnail navigator (25% height) a different height 9) Removed option to hide Leeds header and nav bars: should be in the page logic rather than in the viewer logic. - Now in js/toggleLeedsBars.js - Changed updateAnnotationsTextPaneHeight() to work without bar height calculation 10) Added CSS to be independent of website styles (future embedding) 11) Added version number to watermark overlay ================================================================================ TO DO ================================================================================ 1) Fix SVG scaling in IE 2) Add support for Circle, line and Point annotations 3) Begin adding in drawing functionality ================================================================================ ASCII text art generated by https://www.kammerl.de/ascii/AsciiSignature.php