-
Notifications
You must be signed in to change notification settings - Fork 1
DO NOT MERGE: Image text overlay #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,23 @@ | |||
| public class ImageTextOverlay { | |||
| private sharinpix.Utils utils; | |||
| public ImageTextOverlay(){ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces
| } | ||
| public String overlayText(String imageId, String text, String fontStyle, String fontSize, String fontEmphasis, String gravity, String borderWidth, String borderStyle, String borderColor){ | ||
| String sanitizedText = EncodingUtil.urlEncode(text, 'UTF-8').replaceAll('\\+', '%20').replaceAll('%2C', '%252C'); | ||
| String overlay = 'text:'+fontStyle+'_'+fontSize+'_'+fontEmphasis+'_stroke:'+sanitizedText+',bo_'+borderWidth+'px_'+borderStyle+'_'+borderColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to align = and =>... will have problems when adding more assignment statements
| 'Id' => albumId | ||
| }); | ||
| } | ||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space
| @RemoteAction | ||
| global static String overlayText(String imageId, String text, String options){ | ||
| map<string, object> optionsMap = (map<string, object>) JSON.deserializeUntyped(options); | ||
| String fontStyle = (String) optionsMap.get('fontStyle'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to align
| * @param options [JSON string with more image transformation options] | ||
| * @return [image URL of image with overlaid text] | ||
| */ | ||
| @RemoteAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
| @@ -0,0 +1,5 @@ | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no beginning space in xml
src/pages/ImageTextOverlayPage.page
Outdated
| var fontSize = document.getElementById("fontSizeInput").value; | ||
| var fontEmphasis = document.getElementById("fontEmphasisInput").value; | ||
| var gravity = document.getElementById("gravityInput").value; | ||
| var borderWidth = document.getElementById("borderWidthInput").value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation - using tabs
| } | ||
| } | ||
| ); | ||
| }//end cropFace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
| global class ImageTextOverlayController { | ||
| global String parameters {set;get;} | ||
| public Id albumId; | ||
| public ImageTextOverlayController(ApexPages.standardController controller){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation !
No description provided.