{"action":"created","issue":{"url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/issues/17","labels_url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/issues/17/comments","events_url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/issues/17/events","html_url":"https://github.com/open-craft/jsinput-vectordraw/pull/17","id":82220764,"number":17,"title":"Daniel","user":{"login":"dseaton","id":1703442,"avatar_url":"https://avatars.githubusercontent.com/u/1703442?v=3","gravatar_id":"","url":"https://api.github.com/users/dseaton","html_url":"https://github.com/dseaton","followers_url":"https://api.github.com/users/dseaton/followers","following_url":"https://api.github.com/users/dseaton/following{/other_user}","gists_url":"https://api.github.com/users/dseaton/gists{/gist_id}","starred_url":"https://api.github.com/users/dseaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dseaton/subscriptions","organizations_url":"https://api.github.com/users/dseaton/orgs","repos_url":"https://api.github.com/users/dseaton/repos","events_url":"https://api.github.com/users/dseaton/events{/privacy}","received_events_url":"https://api.github.com/users/dseaton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-29T02:29:46Z","updated_at":"2015-06-02T07:29:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/pulls/17","html_url":"https://github.com/open-craft/jsinput-vectordraw/pull/17","diff_url":"https://github.com/open-craft/jsinput-vectordraw/pull/17.diff","patch_url":"https://github.com/open-craft/jsinput-vectordraw/pull/17.patch"},"body":"@antoviaque @mtyaka I have added two new examples for Physics. Instructors would like to have students directly measure properties of a given image. We can use the segment tool for this, but need to update the \"length\" in vector properties.\r\n\r\nHere is the technical request:\r\nIs it possible to provide a parameter that acts as a scaling factor for length? If so, could we also have a scaling factor for angle?\r\n\r\nLength: In the singleSlitDiff example, we would like to scale the length by a multiplicative factor. \r\n(factor) * Length, where factor might be a conversion to \"millimeters\". The only other small detail would be to allow a unit to be displayed. Length (mm): Value()\r\n\r\nAngle: For angle, the factor would almost certainly always be additive, as angles don't typically scale.\r\n(factor) + Angle, where factor might be 20 degrees for the box on an incline example.\r\n\r\nFactor would default to 1.0, but there would be parameters in the \"html\" files that allowed us to set them.\r\n\r\nAlso, not sure you all realize it, but we are crossing new boundaries with allowing students to directly measure with this tool. Would bring the laboratory online. For the 15th example, this is something we have people do in the lab with rulers. :)"},"comment":{"url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/issues/comments/107838894","html_url":"https://github.com/open-craft/jsinput-vectordraw/pull/17#issuecomment-107838894","issue_url":"https://api.github.com/repos/open-craft/jsinput-vectordraw/issues/17","id":107838894,"user":{"login":"mtyaka","id":32585,"avatar_url":"https://avatars.githubusercontent.com/u/32585?v=3","gravatar_id":"","url":"https://api.github.com/users/mtyaka","html_url":"https://github.com/mtyaka","followers_url":"https://api.github.com/users/mtyaka/followers","following_url":"https://api.github.com/users/mtyaka/following{/other_user}","gists_url":"https://api.github.com/users/mtyaka/gists{/gist_id}","starred_url":"https://api.github.com/users/mtyaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtyaka/subscriptions","organizations_url":"https://api.github.com/users/mtyaka/orgs","repos_url":"https://api.github.com/users/mtyaka/repos","events_url":"https://api.github.com/users/mtyaka/events{/privacy}","received_events_url":"https://api.github.com/users/mtyaka/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T07:29:17Z","updated_at":"2015-06-02T07:29:17Z","body":"@dseaton The `presence_errmsg` and `segment_coords_errmsg` weren't working because the python code in `DrawLRAS_S3.xml` was a bit outdated and didn't include support for custom error messages. I updated the python code in the example so that custom error messages work.\r\n\r\nI implemented a custom midpoint check and replaced the `segment_coords` check in Example 16 with it (https://github.com/open-craft/jsinput-vectordraw/commit/3e7def7765d88c120a4645a99ae916a92c4750c6). You will probably want to modify the `x,` `y`, and `tolerance` values in `custom_checks: [{check: 'check_sras2_midpoint', x: 1.75, y: -0.25, tolerance: 2.0}]`. You may also want to change the generic error message in https://github.com/open-craft/jsinput-vectordraw/blob/3e7def7765d88c120a4645a99ae916a92c4750c6/Notes_and_Examples/16_DrawRelativeSegment/drawLRAS_S3.xml#L15.\r\n\r\nI updated the example at https://studio.edge.edx.org/container/i4x://DavidsonNext/Ann101/vertical/2c6c7bc8a12a4f5e95172c8987b26afa?action=new with latest code - please check and let me know if I need to change the custom check in any way.\r\n\r\nThe other requested changes (length factor, base angle, and custom label color) will be implemented in a separate pull request.\r\n\r\n"}}