我无法访问资源文件夹中的文件。在我设置自己的AppConfig之前,我可以完全访问/ src / main / resources / widgets下的文件,但是现在我已经得到404。我阅读了很多有关资源处理程序的文章,我的代码正在为它们工作。
// COLLISION DETECTION FUNCTION
function collision($colSib, $el , $uiItem) {
var zoneHeight = $el.parent('.zone').height();
var zoneWidth = $el.parent('.zone').width();
var x1 = $el.position().left; // ui.element left position
var y1 = $el.position().top; // ui.element top position
var h1 = $el.outerHeight(true); // ui.element outerHeight
var w1 = $el.outerWidth(true); // ui.element outerWidth
var b1 = y1 + h1; // ui.element "bottom" position
var r1 = x1 + w1; // ui.element "right" position
var x2 = $colSib.position().left; // collided sibling left position
var y2 = $colSib.position().top; // collided sibling top position
var h2 = $colSib.outerHeight(true); // collided sibling outerHeight
var w2 = $colSib.outerWidth(true); // collided sibling outerWidth
var b2 = y2 + h2; // collided sibling "bottom" position
var r2 = x2 + w2; // collided sibling "right" position
// X-AXIS
if ( (r1 == x2 && y1 == y2 || r1 == x2 && b1 == b2)
|| (y2 < y1 && b2 > b1 && r2 > r1)
|| (y1 < y2 && b1 > b2 && r2 > r1)
|| (y2 < b1 && b2 > b1 && r1 == x2) )
{
$uiItem.resizable( "option", "maxWidth", (x2 - x1) );
console.log('true');
} else {
$uiItem.resizable( "option", "maxWidth", null );
$uiItem.resizable( "option", "maxWidth", zoneWidth);
$uiItem.css('max-width',zoneWidth);
console.log('false');
}
// Y-AXIS
if ( (b1 == y2 && x1 == x2 || b1 == y2 && r1 == r2)
|| (x1 < x2 && r1 > r2 && b1 == y2)
|| (x2 < x1 && r2 > r1 && b1 == y2)
|| (r2 > r1 && x2 < r1 && b1 == y2) )
{
$uiItem.resizable( "option", "maxHeight", (y2 - y1) );
console.log('true');
} else {
$uiItem.resizable( "option", "maxHeight", null );
$uiItem.resizable( "option", "maxHeight", zoneHeight);
$uiItem.css('max-height',zoneHeight);
console.log('false');
}
}