Code Dump: High DPI Image Review

Review Request #7754 — Created Nov. 4, 2015 and discarded — Latest diff uploaded

Information

Review Board
master

Reviewers

Code Dump: High DPI Image Review

11/04/2015

WIP of the drop down menu for selecting image scale.
(RESOLVED - 11/07/2015) Problem # 1 - Can't get menu to appear in the center and just to the right of the image filename (see mockup image)


11/07/2015

Resolved menu positioning problem (Problem # 1)
Fixed a couple of issues raised from reviews about the CSS code. (1 unresolved review)

(RESOLVED - 11/07/2015) Problem # 2 - I put a console.log(this.$el); into the ImageAttachmentView render function, which is basically the corresponding view to the screenshot attached, yet nothing appears on the console even when the view is being generated.


11/13/2015

Re-formatted menu html code to be more readable.
Added event binding to the menu options.
Hard coded the event's function to increase image size by 200%.

NOTE: The week's goal was to try and understand the RB's implementation of Backbone.js and jQuery, and to try and get any kind of change in size of the image. So for now, clicking on the menu options will keep increasing the image size by 200%. Will begin working on the actual implementation of the buttons starting this week.


11/15/2015

Full menu scaling capabilities added for ImageAttachmentView.
Minor rearrangement of code.
Change menu text color from blue to black.


11/21/2015

WIP on getting scaling to work on OnionDiff mode. It is proving to be more challenging than imageAttachmentView mode because it looks like I'll have to change the CSS of multiple classes rather than just one.

Problem # 3 - When there are diffs, I can't get the menu to appear in line with the image file names. I also tried putting the menu in the bar with the mode selections but that is giving me positional problems too.

Moved var statement for $headerInner to top of function.
Standardized the formatting of function documentation.
Removal of unnecessary lines and statements.


11/28/2015

Full menu scaling capabilities added for ImageTwoUpDiffView and ImageOnionDiffView.
Moved var statement for $headerInner to within a main var statement.
Renamed imgResSel to imgResolutionMenu.


12/03/2015

Full menu scaling capabilities added for all views.
Added a flag, this._isFirstRender, which ensures that the original image dimensions will only be calculated and cached once when user enters the diff modes.
Renamed variables to suit JS naming conventions (changed underscore case to camel case).
Removed redundant parseFloats within functions which were already taking in floats.

Ensured that images are resizing correctly on the browser.