Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Fix scribing scaling #366

Merged
merged 17 commits into from
Jan 27, 2015
Merged

Conversation

kxmbrian
Copy link
Contributor

Fix for #336. Scribbles should now display consistently on different browser / screen / canvas sizes.

Other minor improvements also included.

@@ -82,7 +113,7 @@ function loadScribble(c, scribble, layersList) {
.attr('selected','selected');
layersList.append(newLayerEntry);

var toggleLayer = function (showLayer) {
function toggleLayer(showLayer) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 4cf0998 on kxmbrian:fix-scribing-scaling into 305e5e8 on Coursemology:development.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling c295033 on kxmbrian:fix-scribing-scaling into 305e5e8 on Coursemology:development.

@allenwq
Copy link
Member

allenwq commented Jan 18, 2015

@kxmbrian
Copy link
Contributor Author

Good catch. It seems like neither general_answers or scribing_answers are invoked anywhere. Should I be commenting / removing the unnecessary code actually?

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling af779f9 on kxmbrian:fix-scribing-scaling into 305e5e8 on Coursemology:development.

@allenwq
Copy link
Member

allenwq commented Jan 19, 2015

Yah. seems no where called general_answers so nothing was broken. But better fix it in case someone called it in future.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) when pulling 4a6eaf3 on kxmbrian:fix-scribing-scaling into 305e5e8 on Coursemology:development.

if (newJSON !== oldJSON) {
ajaxField.data('content', newJSON);
$.ajax({
type: "POST",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

//adapted from
//http://stackoverflow.com/questions/19682706/how-do-you-close-the-iris-colour-picker-when-you-click-away-from-it
$(document).click(function(e) {
if (!$(e.target).is('.scribing-color-val .iris-picker .iris-picker-inner')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

var newLeft = viewportLeft + deltaLeft;
var newTop = viewportTop + deltaTop;
tryPan(newLeft, newTop);
} else if (options['isForced']) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

['isForced'] is better written in dot notation.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 56.78% when pulling cf73150 on kxmbrian:fix-scribing-scaling into 305e5e8 on Coursemology:development.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 56.78% when pulling cc5e173 on kxmbrian:fix-scribing-scaling into 78315e8 on Coursemology:development.

@kxmbrian
Copy link
Contributor Author

@wangqiang1208, this feature is currently frozen and ready for a final check before merge. Could you help to review?

@jsyeo
Copy link
Contributor

jsyeo commented Jan 25, 2015

@wangqiang1208, good to merge?

@allenwq
Copy link
Member

allenwq commented Jan 26, 2015

@kxmbrian @jsyeo Give me a while, I'm testing this !

<input type="text" class="scribing-color-val" id="scribing-color-<%= qid %>"></input>
<input type="range" id="scribing-width-<%= qid %>" value="2" min="0" max="30" style="width: 100px"></input>
<div class="panel">
<input type="text" class="scribing-color-val" id="scribing-color-<%= qid %>"></input>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not aligned here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsyeo it was here

@allenwq
Copy link
Member

allenwq commented Jan 26, 2015

@kxmbrian @jsyeo I've tested this PR, Tests on Safari and Chrome shows that #336 is fixed.

I haven't looked at javascript code. And this PR seems only changed the scribing related stuff, so should not have side effects on other assessment parts.

Except some minor issues, I think this is good to merge.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 56.78% when pulling b81480b on kxmbrian:fix-scribing-scaling into 78315e8 on Coursemology:development.

@jsyeo
Copy link
Contributor

jsyeo commented Jan 26, 2015

@wangqiang1208 minor issues?

@allenwq
Copy link
Member

allenwq commented Jan 27, 2015

@jsyeo Sorry, didn't notice your message, this can be merged.

@jsyeo
Copy link
Contributor

jsyeo commented Jan 27, 2015

Except some minor issues, I think this is good to merge.

What are the minor issues?

@allenwq
Copy link
Member

allenwq commented Jan 27, 2015

See my comments, actually just line alignments.

On Wednesday, January 28, 2015, Jason Yeo [email protected] wrote:

Except some minor issues, I think this is good to merge.

What are the minor issues?


Reply to this email directly or view it on GitHub
#366 (comment)
.

@jsyeo
Copy link
Contributor

jsyeo commented Jan 27, 2015

See my comments

Which one?

@allenwq
Copy link
Member

allenwq commented Jan 27, 2015

Cannot find the last outdated one ?

On Wednesday, January 28, 2015, Jason Yeo [email protected] wrote:

See my comments

Which one?


Reply to this email directly or view it on GitHub
#366 (comment)
.

@jsyeo
Copy link
Contributor

jsyeo commented Jan 27, 2015

@kxmbrian please split your PR next time. You are trying to fix 2-3 issues here. A bit hard for me and @wangqiang1208 to review. Thanks. 😄

jsyeo added a commit that referenced this pull request Jan 27, 2015
@jsyeo jsyeo merged commit 9edc5fc into Coursemology:development Jan 27, 2015
@kxmbrian
Copy link
Contributor Author

@jsyeo What should I do if one PR is built on a previous PR that has not been merged?

@jsyeo
Copy link
Contributor

jsyeo commented Jan 28, 2015

@kxmbrian just have to let us know that the PR depends on another PR. (e.g. Coursemology/coursemology2#78 (comment)) I will merge the one that is depended on first.

@kxmbrian
Copy link
Contributor Author

ok thanks 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants