Made output box bigger, fixed another missing var issue
This commit is contained in:
parent
a172488746
commit
c5c73e76b5
@ -10,10 +10,10 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
output: false,
|
output: false,
|
||||||
execute: function({input}, block){
|
execute: function({input}, block){
|
||||||
$(block.elem).find("span.output").html(input);
|
$(block.elem).find("textarea.output").html(input);
|
||||||
},
|
},
|
||||||
pageBlock: {
|
pageBlock: {
|
||||||
html: "<span class='output'></span>",
|
html: "<textarea class='output' style='width: 190px; height: 135px;'></textarea>",
|
||||||
js: function(){}
|
js: function(){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function getFactors(num){
|
function getFactors(num){
|
||||||
factors = [];
|
var factors = [];
|
||||||
for(var i = 2; i <= num; i++){
|
for(var i = 2; i <= num; i++){
|
||||||
if(num%i == 0){
|
if(num%i == 0){
|
||||||
factors.push(i);
|
factors.push(i);
|
||||||
@ -11,7 +11,7 @@ function getFactors(num){
|
|||||||
function coPrime(a, b){
|
function coPrime(a, b){
|
||||||
aFactors = getFactors(a);
|
aFactors = getFactors(a);
|
||||||
bFactors = getFactors(b);
|
bFactors = getFactors(b);
|
||||||
common = aFactors.filter((factor)=>(bFactors.indexOf(factor) > -1));
|
var common = aFactors.filter((factor)=>(bFactors.indexOf(factor) > -1));
|
||||||
|
|
||||||
return (common.length == 0);
|
return (common.length == 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user