Skip to content

Commit

Permalink
Add support for more than just strings to confirmElm
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazerbeak12345 committed Feb 5, 2022
1 parent 1734671 commit 252ad6b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pixelmanipulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Concerning the function commments, # is number, [] means array, {} means object, () means function, true means boolean and, "" means string. ? means optional, seperated with : means that it could be one or the other
(function(g) {
'use strict';
var pxversion="2.3.0";
var pxversion="2.4.0";
function pix(require,exports,module) {//done like this for better support for things like require.js and Dojo
/*function ret(v) {
return (function() {
Expand Down Expand Up @@ -299,10 +299,14 @@
// (() )
//console.log("ConfirmElm",f);
//loop=typeof loop!=="undefined"?loop:true;
return function confirmElmGeneric(x,y,name,loop ) {//returns a boolean as to weather the inputted element name matches the selected location
// (#,#,"" ,true?)
return function confirmElmGeneric(x,y,id ,loop ) {//returns a boolean as to weather the inputted element name matches the selected location
// (#,#,"":#:[],true?)
//console.log("confirmElm",x,y,name,loop);
return getPixelId(x,y,loop)===innerP.elementTypeMap[name].number;
switch(typeof id){
case"string":id=innerP.elementTypeMap[id].number;break;
case"object":id=innerP.colorToId(id)
}
return getPixelId(x,y,loop)===id
};
},
__MooreNearbyCounter:function(f ) {//Generate mooreNearbyCounter
Expand Down

0 comments on commit 252ad6b

Please sign in to comment.